0
我試圖重寫我的網址爲內部的PHP應用程序,但它不工作,只在一個網址:URL重寫:不工作在一個單一的URL
<a href='/device/' >Link text</a>
<a href='/brand/' >Link text</a>
的.htaccess(谷歌上找到)
在鏈接RewriteEngine on
Options -MultiViews
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301]
RewriteRule ^([a-zA-Z/]+)?$ index.php?vars=$1 [NC,L]
結果點擊:
http://localhost/index.php/?vars=device/
http://localhost/brand/
而且兩者的作品。有任何想法嗎 ?謝謝