Reputation: 195
I have been forced to switch from IIRF to Isapi_Rewrite due to moving to a shared hosting environment from a VPS. The URL rewrites I was using under IIRF should work with minimal modifications, but for some unknown reason only one of the rewrites works.
Here's my httpd.ini for ISAPI_REWRITE V2:
[ISAPI_Rewrite]
RewriteEngine On
RewriteRule /buy-sell-assets$ /search/Assets.asp
ReWriteRule .*trucks-tractor\.html$ /search/NewSearch.asp?cat_id=157
RewriteRule .*trucks-rigid\.html$ /search/NewSearch.asp?cat_id=10
ReWriteRule .*trailers\.html$ /search/NewSearch.asp?cat_id=4
ReWriteRule .*helicopters\.html$ /search/NewSearch.asp?cat_id=481
ReWriteRule .*aircraft-fixedwing\.html$ /search/NewSearch.asp?cat_id=467
ReWriteRule .*aircraft-fixed-wing\.html$ /search/NewSearch.asp?cat_id=467
ReWriteRule .*buses\.html$ /search/NewSearch.asp?cat_id=3
ReWriteRule .*boats\.html$ /search/NewSearch.asp?cat_id=559
ReWriteRule .*cars\.html$ /search/NewSearch.asp?cat_id=8
ReWriteRule .*crushers\.html$ /search/NewSearch.asp?cat_id=635
ReWriteRule .*screens\.html$ /search/NewSearch.asp?cat_id=637
ReWriteRule .*cranes\.html$ /search/NewSearch.asp?cat_id=430
ReWriteRule .*equipment\.html$ /search/NewSearch.asp?cat_id=12
The really odd thing is that the rewrite rule
RewriteRule .*trucks-rigid\.html$ /search/NewSearch.asp?cat_id=10
works, but none of the others do. They are all pointing to the exact same script, so I'm at a complete loss as to why the others aren't working.
Here's the working URL:
http://www.atn.co.za/buy-sell-assets/trucks-rigid.html
Here's one of the non-working URLs:
http://www.atn.co.za/buy-sell-assets/trailers.html
Why should one work and not the others? This is an incredibly frustrating issue, I've been trying various permutations for about four hours now and I'm about to do something drastic :(
If anyone can provide any insight or assistance on this I'd really appreciate it.
Upvotes: 0
Views: 154
Reputation: 511
Try using the following format:
RewriteRule /buy-sell-assets/trucks-tractor\.html$ /search/NewSearch.asp?cat_id=157 [I,L]
make sure each rule ends with [NC,L] or you'll have all your pages pointing at one script.
Upvotes: 1