Modify the .htaccess file to set the default to open the website static pages

.htaccess file to set the default method to open the website static pages. First, copy the following code:

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

The above code means: default order for the site to open the root directory of the file. The first is the "index.html", if not the file, then open the "index.php".

Unfortunately, if you and I use the windows, use a third-party editor (such sublime) to edit this file (because the windows must have a file name), and then save it as you can. Do not use windows built-in editor. reference:

http://www.owe-love.com/myspace/?action=show&id=276

Reproduced in: https: //my.oschina.net/itfanr/blog/195628

Guess you like

Origin blog.csdn.net/weixin_34221276/article/details/91799340