A Pen by Jamie Warburton on CodePen.
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 page | |
RewriteCond %{REMOTE_ADDR} !^000\.000\.000\.000 | |
RewriteCond %{REQUEST_URI} !^/maintenance\.php$ | |
# Allow a specific requ | |
RewriteCond %{REQUEST_URI} !^/company-logo.png$ [NC] | |
# Allow a series of filetypes | |
RewriteCond %{REQUEST_URI} !\.(css|jpe?g?|png|gif|woff|ttf) [NC] | |
RewriteRule ^(.*)$ https://www.domain.com/maintenance.php [R=307,L] |
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
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}\.php -f | |
RewriteRule ^(.*)$ $1.php |
NewerOlder