2014-02-10 75 views
1

更改URL頁面我想改變我的網頁的URL像的.htaccess有三個條件

http://localhost/Dynobase/my_computer.php?name=Deny-computer&type=computer&select=1 

http://localhost/Dynobase/Deny-computer/computer/data/1 

和我這樣的

RewriteRule ^([a-zA-Z_-]+)/([a-zA-Z_-]+)/data/([[0-9]]+)$ /my_computer.php?name=$1&type=$2&select=$3 [L,NC] 
htaccess文件代碼

但我實際上可能錯誤404

也許我的代碼有問題。 請幫助我。

謝謝

回答

0

/Dynobase/.htaccess試試這個:

RewriteEngine On 
RewriteBase /Dynobase/ 

RewriteRule ^([\w-]+)/([\w-]+)/data/([0-9]+)/?$ my_computer.php?name=$1&type=$2&select=$3 [L,NC,QSA] 
+0

我已經試過了,但還是錯誤404 –

+0

看看現在更新的代碼。 – anubhava

+0

哇這個作品,你高手,非常感謝 –