I have following URL and I am struggling to make it work. I am very new to this and any help will be greatly appreciated:
1)Age:
If user enters
http://mysite.com/Toys-For-Age-0-1-Years-old-Kids-page2.htm
then I need this URL to rewrite in
http://mysite.com/ShowbyAge.asp?Age_From=0&Age_To=1&curpage=2
OR
http://mysite.com/ShowbyAge.asp?Age_From=0&Age_To=1
I have below rule but it is causing issue with extra "OPTIONAL" parameter (Curpage=2 2 is variable) whic is not always there
- Code: Select all
RewriteRule ^(.+)/*-(age)-(\w+)\.htm$ /ShowByAge.asp?Age_From=$3 [NC]
===========================================================================================
b) Vendor:
If user enters
http://mysite.com/creativity-for-kids-v-cfk-page2.htm
then I need this URL to rewrite in
http://mysite.com/ShowbyVendor.asp?VendorID=CFK&Curpage=2
OR
http://mysite.com/ShowbyVendor.asp?VendorID=CFK
I have below rule but it is causing issue with extra "OPTIONAL" parameter (Curpage=2 2 is variable) whic is not always there
- Code: Select all
#Vendor URL
RewriteRule ^(.+)/*-(v)-(\w+)\.htm$ /ShowbyVendor.asp?Vendorid=$3 [NC]
===========================================================================================
c)
If user enters
http://mysite.com/Alex-Craft-Scissors-p-Af413.htm
then I need this URL to rewrite in
http://mysite.com/viewproduct.asp?Productid=Af413[/b]
- Code: Select all
# From URL: /Alex-Craft-Scissors-P-Af413.htm and TO URL will be /viewproduct.asp?Productid=Af413
#Product URL
RewriteRule ^(.+)/*-(p)-(\w+)\.htm$ /viewproduct.asp?productID=$3 [NC]
Above code works fine but it is causing issue when I have below URL
http://mysite.com/Alex-Craft-Scissors-p-Af-413.htm
===========================================================================================
[/b]Any other idea to improve any possible issue and make URL better will be always welcome[/b]