rewrite rule not working
4 posts
• Page 1 of 1
rewrite rule not working
Hi,
I just installed ISAPI_Rewrite 3.0, and have written following rules
RewriteRule /products /products.asp [I]
RewriteRule /products_details /products_details.asp [I]
When i try to go to products_details.asp page, I am redirected to products.asp page.
Can someone please help me to fix this?
Thanks,
Manish
I just installed ISAPI_Rewrite 3.0, and have written following rules
RewriteRule /products /products.asp [I]
RewriteRule /products_details /products_details.asp [I]
When i try to go to products_details.asp page, I am redirected to products.asp page.
Can someone please help me to fix this?
Thanks,
Manish
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: rewrite rule not working
Hello,
You need to specify the beginning and the end of the pattern:
^ - is the beginning
$ - is the end.
Right now you have the first rule working for every request that has "/product" (and can be followed by any other characters). So the second rule never works.
Try using:
Regards
Andrew
You need to specify the beginning and the end of the pattern:
^ - is the beginning
$ - is the end.
Right now you have the first rule working for every request that has "/product" (and can be followed by any other characters). So the second rule never works.
Try using:
- Code: Select all
RewriteRule ^/products$ /products.asp [I]
RewriteRule ^/products_details$ /products_details.asp [I]
Regards
Andrew
Re: rewrite rule not working
Thank you Andrew very much. I figured out this going through the docs and examples on the helicon site.
Now my rules are working.
Thanks,
Manish
Now my rules are working.
Thanks,
Manish
Re: rewrite rule not working
Hi
I have a file in my website is called cleaningrugtoronto.html I would like to refer it as cleans.
My hosting company is based on IIS. They told me IIS doesn't work with .htaccess.
I created a httpd.conf file with following rules
RewriteEngine On
RewriteRule ^/cleans$ /cleaningrugtoronto.html
When I type www.persianrugservices.ca/cleans I get the message the page cannot be found
Any help?
Thanks
I have a file in my website is called cleaningrugtoronto.html I would like to refer it as cleans.
My hosting company is based on IIS. They told me IIS doesn't work with .htaccess.
I created a httpd.conf file with following rules
RewriteEngine On
RewriteRule ^/cleans$ /cleaningrugtoronto.html
When I type www.persianrugservices.ca/cleans I get the message the page cannot be found
Any help?
Thanks
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 13 guests