.htaccess 创建搜索引擎友好的 URL
我正在寻找一种方法来摆脱我的文件中的 .php 扩展名,我刚刚得到了一个带有 index.php 和 map.php 的静态网站,
我已经尝试了很多不同的教程,但没有任何效果,我只想要以下内容。
http://example.co.uk/map.php becomes http://example.co.uk/map/
你能用静态文件来做到这一点吗
http://example.co.uk/index.php becomes http://example.co.uk/
?我尝试了很多不同的选项,但没有一个对我有用。
我已经尝试过了。
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^map/(.*)/$ map.php
请提供任何帮助。
I am looking for a way to get rid off the .php extension from my file i have just got a static website with index.php and map.php
I have tried lots of different tutorials but none work i just want the following.
http://example.co.uk/map.php becomes http://example.co.uk/map/
and
http://example.co.uk/index.php becomes http://example.co.uk/
Can you do this with a static file i have tried so many different options and none have worked for me.
i have tried this.
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^map/(.*)/$ map.php
Any help please.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个
Try this