在根目录中拥有一个索引页面(例如index.html、index.php)是否至关重要

发布于 2024-09-17 10:26:19 字数 244 浏览 4 评论 0原文

我的根目录中有一个 index.php 页面,它只是重定向到我认为的主页,

如下所示:

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: /lake-district-cottages/" );
?> 

最好只删除索引页面并在 htaccess 中设置我的真实索引,还是需要我有一个文件称为索引?

I have a index.php page in my root that simply reirects to what I would consider my homepage,

like so:

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: /lake-district-cottages/" );
?> 

is it best to just remove the index page and set my true index in my htaccess or is it required that I have a file called index?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

2024-09-24 10:26:19

不需要,只要你在htaccess中设置一个不同的就可以了。

Not needed, as long as you set a different one in htaccess you'll be fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文