我想在我的网站上使用友好的网址。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