Created
July 19, 2012 01:41
-
-
Save yuki777/3140208 to your computer and use it in GitHub Desktop.
maintenance .htaccess
This file contains 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
# maintenance文言のHTMLファイル用意しておく | |
ErrorDocument 503 /maintenance.html | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !=/maintenance.html [NC] | |
RewriteCond %{REQUEST_URI} !\.css$ | |
RewriteCond %{REQUEST_URI} !\.js$ | |
RewriteCond %{REQUEST_URI} !\.jpg$ | |
RewriteCond %{REQUEST_URI} !\.png$ | |
RewriteCond %{REQUEST_URI} !\.gif$ | |
# 全てのパスをメンテしたい場合 | |
#RewriteRule ^.*$ - [R=503,L] | |
# mypage以下をメンテしたい場合 | |
#RewriteRule ^mypage - [R=503,L] | |
# hoge/foo以下をメンテしたい場合 | |
#RewriteRule ^hoge/foo - [R=503,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment