.htaccess:密码保护您的整个网站,但某些页面除外
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了.htaccess:密码保护您的整个网站,但某些页面除外相关的知识,希望对你有一定的参考价值。
Before taking a site "live", I password protect it except the robots.txt for search engines and custom Error pages. You can adapt this to your own use and add other pages in the FilesMatch directive.
# These pages are public <FilesMatch "^(robots\.txt|errorpage\.php)$"> order allow,deny allow from all </FilesMatch> # The rest of the site is private AuthUserFile /path/to/your/.htpasswd AuthType Basic AuthName "Login Required" Require valid-user Order allow,deny Satisfy any
以上是关于.htaccess:密码保护您的整个网站,但某些页面除外的主要内容,如果未能解决你的问题,请参考以下文章