Rewrites Work / 301s Don't

Topics: User Forum
Sep 21, 2010 at 9:39 PM

Hi, We're implementing a series of redirects on an IIS 6.0 server and can't figure out what's wrong with our rules. Regardless of the format or order, we can't get the 301s to be recognized. Here's our IIRI.ini file. If anyone has any ideas on what mmight be going on, we'd appreciate it.

 

RewriteEngine On

# News/PressRewriteRule ^/newsroom/press-releases/([^/\.]+)/?$ /site/newsroom.press-releases.php?news_url=$1 [L,QSA]

RewriteRule ^/([^/\.]+)/?$ /site/$1.php [L,QSA]

RewriteRule ^/([^/\.]+)/([^/\.]+)/?$ /site/$1.$2.php [L,QSA]

RewriteRule ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /site/$1.$2.$3.php [L,QSA]

# 301 Redirects From Old Site RedirectRule ^/spangler/aboutus/contactus.php http://www.spanglercandy.com/contact [R=301]

RedirectRule ^/spangler/newspr/allergens.php http://www.spanglercandy.com/faqs/allergen-information [R=301]

RedirectRule ^/spangler/newspr/kosher.php http://www.spanglercandy.com/faqs/kosher-information [R=301]

RedirectRule ^/spangler/newspr/faqs.php http://www.spanglercandy.com/faqs/general-faqs [R=301]

RedirectRule ^/spangler/newspr/nutritionfactspage.php http://www.spanglercandy.com/faqs/nutrition-facts [R=301 ]

RedirectRule ^/spangler/products/candycanes.php http://www.spanglercandy.com/our-brands/candy-canes [R=301]

RedirectRule ^/spangler/products/circuspeanuts.php http://www.spanglercandy.com/our-brands/circus-peanuts [R=301]

RedirectRule ^/spangler/products/dumdumpops.php http://www.spanglercandy.com/our-brands/dum-dum-pops [R=301]

RedirectRule ^/spangler/products/saftpops.php http://www.spanglercandy.com/our-brands/saf-t-pops [R=301]

RedirectRule ^/spangler/products/shrekcanes.php http://www.spanglercandy.com/our-brands/candy-canes/shrek [R=301]

Coordinator
Sep 22, 2010 at 4:27 AM
What does the /iirfstatus page say? What does the iirf logfile say?
Sep 22, 2010 at 1:29 PM

IIRF Status Report

IIRF Global Status

IIRF Version Ionic ISAPI Rewriting Filter (IIRF) 2.1.1.23 x86 RELEASE
Built on May 30 2010 13:26:57
Filter DLL C:\Program Files\Ionic Shade\IIRF 2.1\IIRF.dll 
PCRE Version 8.02 2010-03-19
IIRF Started 2010/09/22 09:22:01 Eastern Daylight Time
Current time 2010/09/22 09:23:58 Eastern Daylight Time
Server Ini file C:\Program Files\Ionic Shade\IIRF 2.1\IirfGlobal.ini 
Last Update of Ini 2009/11/24 10:26:50 Eastern Daylight Time 
  #Lines 66
  #Warnings 0
Rewrite Engine (all vdirs) ON

IIRF Vdir Status

APPL_MD_PATH /LM/W3SVC/1/Root
Ini file E:\IIS\wwwroot\Iirf.ini
Ini file timestamp 2010/09/22 09:21:42 Eastern Daylight Time
  Last read 2010/09/22 09:22:01 Eastern Daylight Time
  #Ini Modules 1
  #Lines 22
  #Rules 4
  #Warnings 0
  #Errors 0
Log file E:\LogFiles\iirf_new.log.6068.log
Log level 4
Rewrite Engine ON
Rewrite Base '--'
Remote Status Inquiry disabled
URL Decoding ON
Iteration Limit 8
Proxy Timeouts (sec.) Resolve=30 Connect=30 Send=30 Receive=30
#Requests Processed 84
Coordinator
Oct 1, 2010 at 1:06 AM
Ok, the iirfstatus page looks good. Now, what does the iirf logfile say, for a single request that you think should get redirected (301)? I think i. May be possible that your last RewriteRule is processing the urls that you wish to have redirected. With an iirf ruleset with multiple rules, such as you have, the order of appearance of the rules is important. Since your 301's are more "specific" than the rewrite rules, maybe you should try putting them at the top of the iirf.ini file. Good luck.