我想在我的網站上使用友好的網址。URL重寫不變URL
基本上,我希望www.example.com/index.php?view=contact顯示爲www.example.com/view/contact - 將聯繫人更改爲各種其他頁面。
這裏是我拼湊起來的.htaccess文件:
RewriteEngine on
RewriteRule ^view/([^/\.]+)/?$ /view=$1 [L]
雖然,這是行不通的。有什麼建議麼?
Mod_rewrite已打開,我可以將其更改爲www.example.com/contact/。
apache如何在'www.example.com/view = contact'上工作? – hjpotter92
apache config的mode_rewrite –
你想'www.example.com/view = contact'或'www.example.com/?view = contact'? – anubhava