301 Redirect status help

Oct 14, 2009 at 8:02 PM

Hi Cheeso,

Thank you for your previous help on getting iirf setup correctly and I am now successfully redirecting.  The issue I am running into now is not being able to get a 301 status returned instead of a 302 on my redirects.  Here is one of the sample working rules that I have been testing with:

RewriteRule /product/catalog.cfm/nid/(.*)$  /predirect.aspx?nid=$1 [L]

From the documentation I read have found, I have tried these examples to try and get a 301 result but everytime I change the rule I begin getting 404 errors and the redirect no longer works. 

RewriteRule /product/catalog.cfm/nid/(.*)$  /predirect.aspx?nid=$1 [L,R=301]

RewriteRule /product/catalog.cfm/nid/(.*)$  /predirect.aspx?nid=$1 [R=301,L]

RewriteRule /product/catalog.cfm/nid/(.*)$  /predirect.aspx?nid=$1 [L,RP]

Thank you in andvance for your time and consideration.

- Joe


Oct 14, 2009 at 8:06 PM

if you are using a RewriteRule, then you are not redirecting. 

You need a RedirectRule in order to do redirects.  R=301 works only with RedirectRule, it doesn't work with RewriteRule.

Check your logfile, it will show error messages indicating this.

It's a good idea to check /iirfstatus as a quick verification that your rules are being parsed properly.   For your rules, you should surely see an error in the iirfstatus check.

Check the doc for more info on any of this.

Good luck!