"Your message contains too many URLs. The maximum number of URLs allowed is 2."Due to the above restriction of these boards, I had to switch http:// with [http://]
I have a client where they run their own server, on an IIS platform. We had them install the latest version of ISAPI Rewrite plugin recently. Our rewrites are fine, but we needed to do 301 redirects as well for the search engines to update their URLs -- but soon as I add 1 of my 301 redirects, it crashes the ISAPI Rewrite plugin, and none of the rewrites work after that -- returns 404.
I've added a couple examples of my 301 redirects. Someone suggested that I need to do a condition, but I don't quite understand the logic behind that, because the way I see it, there is no infinite loop happening. I tested at
http://www.seoconsultants.com/tools/headers.asp, and all seems fine.
Code:
RewriteEngine On
RewriteBase /
# 301 Redirects
RewriteCond %{QUERY_STRING} ^par=links$
RewriteRule ^index\.php$ [http://]www.companyscoming.com/links/? [R=301,L]
RewriteCond %{QUERY_STRING} ^par=legal&cat=security$
RewriteRule ^index\.php$ [http://]www.companyscoming.com/legal/security/? [R=301,L]
# Rewrites
RewriteRule ^(\b(?!\w*?cookbooks|recipes|cooking|other\w*)\w+)/([^/]*)/$ /index.php?par=$1&cat=$2 [NC]
RewriteRule ^(\b(?!\w*?cookbooks|recipes|cooking|other\w*)\w+)/$ /index.php?par=$1 [NC]