【htaccess】Basic認証と特定ファイルの除外方法
まずはBasicコピペ用。
あ、apache想定でやんす。
AuthUserFile /www/.htpasswd
AuthType Basic
AuthName "Web access"
Require valid-user
お次に除外は下記コピペ。
Satisfy any
order allow,deny
allow from all
説明不要かと。
おまけでWordpressのセキュリティ対策用コピペ。
RewriteEngine On
RewriteBase /
RewriteRule ^xmlrpc\.php$ "http\:\/\/0\.0\.0\.0\/" [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
めんどくさがりだなあ自分。