Topic: Help with redirect
|

|
| Author |
|
SliNgSh0t Newbie

Joined: 22 June 2010
Online Status: Offline Posts: 13
|
| Posted: 09 July 2010 at 5:32pm | IP Logged
|
|
|
HI,
How can I write these rules?
If a user clicks on http://myhost.com/products.asp?cat=SYS I would like it to display http://myhost.com/Desktop-Computers. I would also need a next flag because there could be more querystring parameters, so http://myhost.com/products.asp?cat=SYS&sort=ASC would display http://myhost.com/DesktopComputers~sort~ASC and so on. Of course I have many categories so I guess I would have many rule pairs, http://myhost.com/products.asp?cat=NBB would display as http://myhost.com/Notebook-Computers
Thanks
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10489
|
| Posted: 12 July 2010 at 8:55am | IP Logged
|
|
|
In ISAPI_Rewrite v2 you'll need a lot of rules (while in v3 you can use mapfiles to dramatically shorten the config).
"If a user clicks on http://myhost.com/products.asp?cat=SYS I would like
it to display http://myhost.com/Desktop-Computers."
RewriteRule /products\.asp\?cat=SYS http://myhost.com/Desktop-Computers [I,RP] RewriteRule /Desktop-Computers /products.asp\?cat=SYS[I,L]
RewriteRule /products\.asp\?cat=SYS&sort=ASC http://myhost.com/Desktop-Computers~sort~ASC
[I,RP]
RewriteRule /Desktop-Computers~sort~ASC /products.asp\?cat=SYS&sort=ASC[I,L]
RewriteRule /products\.asp\?cat=NBB http://myhost.com/Notebook-Computers
[I,RP]
RewriteRule /Notebook-Computers /products.asp\?cat=NBB[I,L]
But I strongly recommend having a look at how it's done with v3: http://helicontech.blogspot.com/2009/02/isapirewrite-faq.html
__________________ Regards,
Anton
|
| Back to Top |
|
| |
|
|
If you wish to post a reply to this topic you must first login
If you are not already registered you must first register
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum
|