在根目录中拥有一个索引页面(例如index.html、index.php)是否至关重要
我的根目录中有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不需要,只要你在htaccess中设置一个不同的就可以了。
Not needed, as long as you set a different one in htaccess you'll be fine.