Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

migrated from stackoverflow.com Sep 15 '11 at 22:29

This question came from our site for professional and enthusiast programmers.

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.