【发布时间】:2010-10-11 20:20:48
【问题描述】:
服务器:Apache
我希望通过以下方式重写我的网址,但我无法找到让它工作的方法。
http://website.com/index.html
我希望它重定向到:
http://website.com/
所以基本上我想加载 index.html,但不在 url 中显示它。我也不想给它取另一个名字。我不是在寻找 /index.html 变成 /index
此外,我正在尝试获取任何 GET 数据,例如:
http://website.com/index.html?id=0&name="fred"
重写为:
http://website.com/?id=0&name="fred".
如果您有一个不使用 .htaccess 文件的解决方案,也可以。
【问题讨论】:
标签: html apache mod-rewrite url-rewriting