通过.htaccess文件设置网站的默认页
PHP语言开发的网站设置默认打开静态页面的方法。首先复制如下代码:
<Files ~ "^.(htaccess|htpasswd)$">test
deny from alltest
</Files>test
DirectoryIndex index.html index.php test
order deny,allowtest
上面代码的意思是:网站默认打开根目录下文件的顺序。首先是“index.html",若没有该文件,则打开“index.php"。