I wrote a rewrite rule for one of my pages. This rule is supposed to be for a specific single URL only hence the "static-ness".

RewriteRule ^picks/categorizedPicks/126$ search/?catalogue=11&module=20 [NC,L,R=301]

This rule is a permanent redirect with the R=301 flag.

The redirect works fine without the R=301 flag but gives a 403 error with it.

Anyone knows what the problem is?

  • as I know, for non-external redirects you should not put that in rewriterule. because it adds file localtion on server to request URI and that makes an error!
    – undone
    Sep 14 '11 at 11:11
  • Can you try: RewriteRule ^picks/categorizedPicks/126$ /search/?catalogue=11&module=20 [NC,L,R=301]
    – anubhava
    Sep 14 '11 at 12:23

When you use the [R] flag, your substitution should be a URL not a relative path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy