301 Redirects Not Working - Only Getting 302's

Jan 16, 2008 at 9:49 PM
Hi there,

I'm trying to redirect my URL's search engine friendly, but I can only do 302 redirections:

RewriteRule ^/Articles/Funny-Thing/id /tr/funny-thing.asp R

I tried the following, all resulted with a HTTP 200 header:

RewriteRule ^/Articles/Funny-Thing/id /tr/funny-thing.asp R=301
RewriteRule ^/Articles/Funny-Thing/id /tr/funny-thing.asp RP
RewriteRule ^/Articles/Funny-Thing/id /tr/funny-thing.asp RP
RewriteRule ^/Articles/Funny-Thing/id /tr/funny-thing.asp I,RP

I ended up with a simple php script to do the 301 redirect, but I want to do it with the rewrite filter.

Any suggestions or ideas?

Jan 31, 2008 at 8:20 PM
Two issues with what you wrote here. Your missing the "$" to end the pattern and missing the square brackets around the "R=301"
Jan 31, 2008 at 9:27 PM
could be the reason your rules look wrong is that you haven't enclosed them in double-curly braces.
That's how you "quote" some code in this wiki,
try again, and we'll have a look.