使用 .htaccess 更改 url
我有一个以下格式的网址:
http://example.com/realestate/index.php?page=services.html
如何使用 .htaccess
文件将其更改为以下格式?
http://example.com/services.html
因此, index.php?page=
被省略,只有 services.html
部分显示在浏览器中 网址。
我对编写 .htaccess 文件一无所知。
I have an url in the following format:
http://example.com/realestate/index.php?page=services.html
How can change it to the following format with a .htaccess
file?
http://example.com/services.html
So that index.php?page=
is omitted and only services.html
part is shown in the browser's
url.
I dont know anything about writing .htaccess files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这样的操作:
现在 url xyz.com/services.html 将被重写为 xyz.com/index.php?page=services.html
Try something like this:
Now the url xyz.com/services.html would be rewritten to xyz.com/index.php?page=services.html