【问题标题】:Removing filename from url with htaccess使用 htaccess 从 url 中删除文件名
【发布时间】:2015-06-03 09:47:36
【问题描述】:

我有一个单页网站

http://picniclounge.com/parallax-page/index.html

我希望它阅读 picniclounge.com/,而不是最后的文件夹和 index.html。

如何使用 htaccess 做到这一点?

【问题讨论】:

    标签: url rewrite


    【解决方案1】:

    你可以在你的 htaccess 中使用它:

     DirectoryIndex /parallax-page/index.html
    

    【讨论】:

    • 如果这是视差页面文件夹中唯一的 index.html,则为优雅的解决方案。如果不是很危险;-)
    猜你喜欢
    • 1970-01-01
    • 2016-04-13
    • 2012-11-12
    • 1970-01-01
    • 1970-01-01
    • 2023-04-04
    • 2015-06-23
    • 2015-07-27
    相关资源
    最近更新 更多