gpt4 book ai didi

mod-rewrite - mod_rewrite 如何隐藏 "index.html"

转载 作者:行者123 更新时间:2023-12-03 02:39:08 25 4
gpt4 key购买 nike

我有一个关于 mod_rewrite 的问题。

这是我用 httrack 创建的静态 html 站点架构:

http://www.example.com/index.html
http://www.example.com/example/index.html
http://www.example.com/example1/index.html
http://www.example.com/example2/example/index.html
http://www.example.com/example3/example/example/index.html

我想用mod_rewrite隐藏浏览器url中的所有index.html。像:

http://www.example.com/example2/example/

mod_rewrite 命令是什么?此操作完成后是否需要重命名我的内部链接?

感谢您的帮助:)

最佳答案

使用DirectoryIndex在您的 .htaccess 文件中(来自 root/document_root 文件夹)

例如:

DirectoryIndex index.html

关于mod-rewrite - mod_rewrite 如何隐藏 "index.html",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8019889/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com