GoDaddy主机cPanel设置index缺省首页方法

cPpanel如何设置index”缺省首页”?.htaccess设置网站默认首页次序? 现在我想增加index.htm与index.php为缺省首页,应该如何加? cPpanel控…

godaddy
cPpanel如何设置index”缺省首页”?.htaccess设置网站默认首页次序?
现在我想增加index.htm与index.php为缺省首页,应该如何加?
cPpanel控制面板,如何设置网站默认首页index.html htm php的次序?
国外很多带有cPpanel面板的空间基本上都是基于Apache Web服务的空间,设置网站默认首页的次序,都可以通过设置.htaccess文件来实现。
在.htaccess文件中添加如下行:
DirectoryIndex index.html index.htm index.php pagename.html
然后将.htaccess文件上传至网站根目录即可。
请按自己的需要更改首页文件读取的次序。
一般php空间默认是index.php为首页:如果网站用index.php做首页,就不需要设置.htaccess
.htaccess所在位置是进入ftp后的/www/.htaccess

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/3175.html

为您推荐

返回顶部