因此,我想在网页浏览器中清楚地显示网址/短网址。我读过很多htaccess教程..。首先,我试过在本地主机(Xampp),但没有工作.
下面是我想要改变的一个链接:
localhost/proj/index.php?menulinks=contents/products
我想更改这里的链接:index/contents/products
或任何类型的解决方案,这就是htaccess:
RewriteRule ^index.php$ - [L]
RewriteRule ^(.+)/?$ index.php?menulinks=$1 [L]
不起作用
发布于 2014-03-30 13:16:04
将以下内容添加到htaccess应该可以实现您想要的结果。
RewriteEngine On
RewriteCond %{THE_REQUEST} ^(GET|POST)\ /proj/index\.php\?menulinks=(.*)\ HTTP
RewriteRule ^ /index/%2\? [R,L]
RewriteRule ^index/(.*)$ /proj/index.php?menulinks=$1 [L]
将proj/index.php?menulinks=contents/products
转换为index/contents/products
https://stackoverflow.com/questions/22744266
复制相似问题