Created
May 10, 2020 10:47
-
-
Save PJZ9n/84c7a5832afdd6f1a787a75e7998053b to your computer and use it in GitHub Desktop.
条件付きアクセス拒否
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErrorDocument 404 /error/404.php | |
ErrorDocument 503 /error/503.php | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/error/.*$ | |
RewriteCond %{REQUEST_FILENAME} !\.(css|js|png|ico)$ | |
# 好きなIP指定する | |
RewriteCond %{REMOTE_ADDR} !^192.168.0.0$ | |
RewriteRule ^.*$ - [R=503,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment