如何使用 htaccess 删除 index.html index.php
我的博客中有这些网址
http://myblog.com/news/post1/index.php
http://myblog.com/updates/post3/index.html
http://myblog.com/index.html
http://myblog.com/blog/post4/index.php
如何设置 .htaccess 以便所有网址都以“/”结尾
http://myblog.com/news/post1/
http://myblog.com/updates/post3/
http://myblog.com/
http://myblog.com/blog/post4/
提前致谢!
I have these urls in my blog
http://myblog.com/news/post1/index.php
http://myblog.com/updates/post3/index.html
http://myblog.com/index.html
http://myblog.com/blog/post4/index.php
How do I setup .htaccess so that all the urls will end with "/"
http://myblog.com/news/post1/
http://myblog.com/updates/post3/
http://myblog.com/
http://myblog.com/blog/post4/
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要从 PHP 文件中删除 .php 扩展名:
如果您想从 html 文件中删除 .html 扩展名:
或者参见这篇文章:
To remove the .php extension from a PHP file:
If you want to remove the .html extension from a html file:
Or see this post: