Mod rewrite mod“重写如何隐藏”;index.html“;

Mod rewrite mod“重写如何隐藏”;index.html“;,mod-rewrite,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/ex

我有一个关于修改的问题

这是我用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命令是什么? 完成此操作后,是否需要重命名我的内部链接

感谢您的帮助:)

使用.htaccess文件中的(从root/document\u root文件夹中)

例如:


我已经找到了解决办法。。。我希望这是对的:

RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
RewriteRule ^(.*)index\.html$ /$1 [R=301,L] 

特别感谢宙斯之书:)

我的网站url是
http://www.example.com/example/index.html
我想在每个网站上隐藏index.html抱歉,你不理解我。。。我的英语不好:/i我的网站是用httrack创建的,并复制到服务器上,现在我想用mod_rewrite在url中隐藏每个索引html。有可能吗??谢谢你的帮助
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.html\ HTTP/
RewriteRule ^(.*)index\.html$ /$1 [R=301,L]