【发布时间】:2021-04-23 12:55:35
【问题描述】:
我创建了一个子文件夹来访问我的 HTML 网站。但问题是,它不是在子目录 URL 上运行,而是使用 index.html 别名。
例如https://example.com/my-html-site/index.html(运行整个页面的网站)。
但我想要一个简单的重定向来在下面这样的子目录下运行网站,
https://example.com/my-html-site/(当我点击这个网址时,它会显示一个空白页面)。
有没有办法通过htaccess文件规则将https://example.com/my-html-site/index.html重定向到https://example.com/my-html-site/?
提前致谢,
【问题讨论】:
标签: .htaccess web redirect mod-rewrite subdirectory