Last active
August 29, 2015 14:17
-
-
Save janus57/f04f9bfb4d6245a8c7a5 to your computer and use it in GitHub Desktop.
Simple .htaccess for maintenance page
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 503 /maintenance.php | |
| RewriteEngine On | |
| #RewriteCond %{REMOTE_ADDR} !^111\.222\.333\.444$ #to ignore IP | |
| RewriteCond %{REQUEST_URI} !\.(png|jpg)$ #you can add other extension like JS or whatever (to exclude the 503) | |
| RewriteCond %{REQUEST_URI} !/maintenance.php$ #excluding the maintenance page itself | |
| RewriteRule .* - [R=503,L] |
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
| #other possibilitie, but i don't know if it's SEO "compliant" | |
| ErrorDocument 503 /maintenance.php | |
| RewriteEngine On | |
| #RewriteCond %{REMOTE_ADDR} !^111\.222\.333\.444$ #to ignore IP | |
| RewriteCond %{REQUEST_URI} !\.(png|jpg)$ #you can add other extension like JS or whatever (to exclude the 503) | |
| RewriteCond %{REQUEST_URI} !/maintenance.php$ #excluding the maintenance page itself | |
| RewriteRule .* /maintenance.php [L,R=307] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment