Forum Moderators: phranque
http://www.example.com/www/category/00136/aprons.html and the issue im having is after the page loads all other site links also changed.
and those links are having these extra lines(www/category/) in the url now
how to avoid this thing.
This is only indirectly an htaccess problem. There's a pun lurking in there, if only I could drag it out. The problem is that you are rewriting, not redirecting. The moment you do this, you have created two urls.
I want to redirect URL coming likeI suspect that you don't want to do that at all.
http://www.example.com/www/category/00136/aprons.html
into this location
http://www.example.com/www/product/productlist.php?category=00136
http://www.example.com/www/category/00136/aprons.html /www/product/productlist.php?category=00136 when giving absolute path with leading slash from the root. site is not working on local development environment.
when giving absolute path with leading slash from the root. site is not working on local development environment.
I think you want to rewrite requests for this URL:
http://www.example.com/www/category/00136/aprons.html
to this internal path:
/www/product/productlist.php?category=00136
to serve the content.
RewriteEngine On
RewriteRule ^www/category/([0-9]+)/(.*?).html$ www/product/productlist.php?category=$1 [L]