开发者

How to save friendly urls in my browser history?

开发者 https://www.devze.com 2023-01-21 17:35 出处:网络
I use friendly urls in my site, But my browser does\'nt 开发者_开发技巧save all urls in the history browser???

I use friendly urls in my site, But my browser does'nt 开发者_开发技巧save all urls in the history browser???

this is my .htaccess:

Options +FollowSymLinks
RewriteEngine on

RewriteRule category/(.*)\.html index.php?inid=3&id=$1&%{QUERY_STRING}
RewriteRule products/(.*)\.html index.php?inid=4&id=$1&%{QUERY_STRING}


If you're linking users to the index.php?inid=3&id=### URLs, that's what's going to show up in the browser history. Rewrite rules don't redirect the non-pretty URL to the pretty one, they just provide the pretty ones as alternates.

You'll need to change your site's links to go to the pretty versions.

As a side note, adding the [QSA] flag (query string attached) to the end of your rules will prevent the need to hard-code the QUERY_STRING variable into your rules.

0

精彩评论

暂无评论...
验证码 换一张
取 消