2014-01-27 44 views
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/ 

而且兩者的作品。有任何想法嗎 ?謝謝

回答

0

我發現它發生在每個URL上.htaccess上的變化
撤銷機會不會改變任何東西。
清空瀏覽器緩存和歷史記錄,刷新頁面並重新運行。