1
我使用mod_rewrite,想做到這一點:刪除 「 - 」 從Apache的重寫參數
RewriteRule ^item/([0-9]*)-(.*)-(.*)$ pages/page_item.php?id=$1-&name=$2-&firstname=$3 [QSA,L]
成爲這個
item/25-Foo-Bar
但是當我通過PHP的var_dump的$ _GET參數,我得到這個:
array (size=3)
'id' => string '25-' (length=4)
'prenom' => string 'Foo-' (length=4)
'nom' => string 'Bar' (length=7)
前2個參數包括「 - 」字符。 如何避免這種情況? 感謝您的幫助
哦,那是從我一個愚蠢的錯誤,謝謝老兄的明確和快速的答案:) – Klaitos 2013-02-09 00:49:08