htaccess Elite

Hire htaccesselite professional

$25 non-refundable deposit for me to look at your request,
$175/hr if both parties agree to work request.

.htaccess tutorial


All times are UTC - 5 hours





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: ISAPI 301 Redirect Crash
PostPosted: Apr 24th, '08, 11:28 

Joined: Apr 24th, '08, 11:20
Posts: 1
"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]


Top
 Profile  
 
 Post subject: Re: ISAPI 301 Redirect Crash
PostPosted: May 9th, '08, 18:16 

Joined: Oct 30th, '06, 13:55
Posts: 89
Try this:

Code:
RewriteEngine On
RewriteBase /

# 301 Redirects
RewriteCond %{QUERY_STRING} ^par=links$
RewriteCond %{THE_REQUEST} ^GET\ /(.*)\ HTTP/ [NC]
RewriteRule ^index\.php$ http://www.companyscoming.com/links/? [R=301,L]

RewriteCond %{QUERY_STRING} ^par=legal&cat=security$
RewriteCond %{THE_REQUEST} ^GET\ /(.*)\ HTTP/ [NC]
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]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB