PDA

View Full Version : Infinite Loop


SEOMalc
11-14-2006, 12:06 PM
OK, I am currently guiding a client through URL rewriting. I have had them change all their internal links to human readable and have set up rules using ISAPI to change them back to the old style URLs.

The issue is, is it possible to accommodate external links that use the old URL structure into the URL rewriting process.

As an example if the old URL was 1.html, the new URL is big-mac.html and httpd.ini contains;

RewriteRule /big-mac\.html /1.html [L]

Is there a way I can get any request for 1.html to go to big-mac.html ?

I have tried;

RewriteCond Host: (.*)
RewriteRule /1\.html http\://$1/big-mac.html [RP]

but I end up with an infinite loop due to the first rule.

Any help as always would be greatly appreciated. It may be that this is not possible but I had to ask.

Thanks

SEOMalc

pagespank
11-14-2006, 01:23 PM
Not an expert on ISAPI, but it shouldn't be a problem to set up redirects for each page just use what you've already posted, without the '[L]':

RewriteRule /big-mac\.html /1.html
RewriteRule /big-mac2\.html /2.html
RewriteRule /big-mac3\.html /3.html ... etc

I'm guessing you'll want to use 301 (permanent) redirects, so maybe:

RewriteRule /big-mac\.html /1.html [RP]

would also work? Also, not sure about the syntax there - perhaps the order should be:

RewriteRule /1\.html/ big-mac.html

Hope this helps.