SEO friendly URL issue

2019-09-02 11:30发布

问题:

I have a problem in after creating SEO friendly links in my site. here is the .htaccess file codes.

RewriteEngine On

RewriteRule ^www/category/([0-9]+)/(.*?).html$ www/product/productlist.php?category=$1 [L]

preciously i have this link

http ://www.mysite.com/www/product/productlist.php?category=00136

now SEO link is this

http ://www.mysite.com/www/category/00136/aprons.html

this is working okay.

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.

site normal links like

http ://www.mysite.com/www/content/index.php

now link shows

http ://www.mysite.com/www/category/content/index.php

how to avoid adding these folder names - www/category/

other links are having short url like this-

a href='../../www/content/index.php'

Thanks

im realy appreciate valuable response for this

回答1:

Your links should start with a slash to indicate the link is relative to the website root.

/content/index.php