通过.htaccess文件设置网站的默认页

建站交流11年前 (2014-02-27)27210


PHP语言开发的网站设置默认打开静态页面的方法。首先复制如下代码:


<Files ~ "^.(htaccess|htpasswd)$">test
deny from alltest
</Files>test
DirectoryIndex index.html index.php test
order deny,allowtest


上面代码的意思是:网站默认打开根目录下文件的顺序。首先是“index.html",若没有该文件,则打开“index.php"。


“通过.htaccess文件设置网站的默认页” 的相关文章

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。