0
對於一個主菜單我已經得到了大約3個header header catagoty的 我喜歡靜態重寫它們。htaccess:如何重寫特定的GET變量?
這是我現在使用的代碼:
RewriteCond %{QUERY_STRING} !dep= [NC]
RewriteRule ^([0-9a-zA-Z-]+)/?$ index.php?dep=$1 [NC,L,QSA]
www.hello.com/car/會給// $ _ GET VAR // DEP =車
簡單嗎?我將如何讓:www.hello.com/car/ford/
讓 '迴歸' DEP =汽車& ID =福特
現在,讓我們說,我知道3我使用paramters? 'DEP?'。你怎麼可以這樣寫:
If www.hello.com/? == car || boat || train/
rewrite to ?dep=
else
rewrite to ?id=
/*
In this example giving www.hello.com/ford/
would return id=ford
but, www.hello.com/boat/
would return dep=boat
*/
更多那就完美了! (一旦你看到它就簡單了) – Rob 2012-02-07 01:47:12