使用.htaccess在地址栏中显示默认页面

使用.htaccess在地址栏中显示默认页面,.htaccess,.htaccess,我想要一个htaccess文件,它将为目录设置默认页面,并在地址栏中显示文件名 例如: 通常,如果index.html是索引文件,则键入地址http://www.example.com/将在内部加载http://www.example.com/index.html但默认情况下,地址栏中不显示/index.html。我们如何展示它 如用户输入http://www.example.com然后地址应更改为http://www.example.com/index.html 请帮忙 感谢使用mod_rew

我想要一个htaccess文件,它将为目录设置默认页面,并在地址栏中显示文件名

例如:

通常,如果
index.html
是索引文件,则键入地址
http://www.example.com/
将在内部加载
http://www.example.com/index.html
但默认情况下,地址栏中不显示
/index.html
。我们如何展示它

如用户输入
http://www.example.com
然后地址应更改为
http://www.example.com/index.html

请帮忙


感谢使用
mod_rewrite
www.example.com
重定向到
www.example.com/index.html
,@shoaibmohammed:你读过并尝试过什么吗?我不擅长编写htaccess脚本。我通常会使用复制粘贴片段,并稍加修改。