| Author |
|
Jerry Newbie

Joined: 28 March 2011
Online Status: Offline Posts: 2
|
| Posted: 28 March 2011 at 2:44pm | IP Logged
|
|
|
I am totally new in using the ISAPI Rewrite utility. I have the following 2 URL's in which I need to use friendly URL's, but I can not figure out to write the RewriteRule. I have read the documentation. Please help:
URL #1:
Ugly URL: /hgtvmicrosite/searchresults.aspx?pagetype=carpet&N=X&Product=CARPETS&Dim1=Hgtv
Friendly I want to use: http://shawfloors-sys/HGTVcarpet
URL #2:
Ugly URL: /HGTVMicrosite/HGTVCarpetDetails.aspx?product=CARPETS&dim1=HGTV&dim2=Butterfly_Wings_182SD-Toasted_Coconut
Friendly I want to use: http://shawfloors-sys/HGTVcarpetDetails
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 29 March 2011 at 3:29am | IP Logged
|
|
|
Please try to use the following rules:
[ISAPI_Rewrite]
RewriteRule /hgtvmicrosite/searchresults\.aspx\?pagetype=carpet&N=X&Product=CARPETS&Dim1=Hgtv http\://shawfloors-sys/HGTVcarpet [I,RP]
RewriteRule /HGTVcarpet /hgtvmicrosite/searchresults\.aspx\?pagetype=carpet&N=X&Product=CARPETS&Dim1=Hgtv [I,L]
RewriteRule /HGTVMicrosite/HGTVCarpetDetails.aspx?product=CARPETS&dim1=HGTV&dim2=Butterfly_Wings_182SD-Toasted_Coconut http\://shawfloors-
sys/HGTVcarpetDetails [I,RP]
RewriteRule /HGTVcarpetDetails /HGTVMicrosite/HGTVCarpetDetails.aspx?product=CARPETS&dim1=HGTV&dim2=Butterfly_Wings_182SD-Toasted_Coconut [I,L]
__________________ Regards,
Anton
|
| Back to Top |
|
| |
Jerry Newbie

Joined: 28 March 2011
Online Status: Offline Posts: 2
|
| Posted: 29 March 2011 at 6:44am | IP Logged
|
|
|
Anton - Thank you so much for your quick reply, you certainly got me headed in the right direction. I need to clarify something on URL #2. The DIM2 parameter needs to be a variable (Butterfly_Wings_182SD-Toasted_Coconut) is just a sample value that could be contained in the variable. Could you please show me how this would need to be written. Again thanks for your help.
|
| Back to Top |
|
| |
Anton Admin Group

Joined: 30 January 2007 Location: Ukraine
Online Status: Offline Posts: 10520
|
| Posted: 29 March 2011 at 7:17am | IP Logged
|
|
|
Ok, I see what you mean. But in this case, we'll need to include this variable parameter name into the "pretty" URL:
RewriteRule /HGTVMicrosite/HGTVCarpetDetails.aspx?product=CARPETS&dim1=HGTV&dim2=(.+) http\://shawfloors-sys/HGTVcarpetDetails/$1 [I,RP]
RewriteRule /HGTVcarpetDetails/(.+) /HGTVMicrosite/HGTVCarpetDetails.aspx?product=CARPETS&dim1=HGTV&dim2=$1 [I,L]
__________________ 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
|