SEO friendly URL issue

痞子三分冷 提交于 2019-12-12 01:48:32

问题


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


来源:https://stackoverflow.com/questions/7162396/seo-friendly-url-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!