Created
November 6, 2018 21:58
Revisions
-
codebymark created this gist
Nov 6, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ # A collection of handy features # Mark Bucknell <markbucknellcc@gmail.com> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # IP address block/redirect # If your ip address is not in this list then redirect to the maintenance page #Options +FollowSymlinks #RewriteCond %{REMOTE_HOST} !^1.2.3.4 # Additional IP added by |<ip address here> #RewriteCond %{REQUEST_URI} !=/maintenance/logo.svg #RewriteCond %{REQUEST_URI} !=/maintenance/style.css #RewriteRule ^(.*)$ /maintenance/index.php [R=302,L] #302 for temporary redirect # Force HTTPS and WWW #RewriteCond %{HTTPS} off [OR] #RewriteCond %{HTTP_HOST} !^www\.website\.com$ [NC] #RewriteRule ^(.*)$ https://www.website.com/$1 [L,R=301] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /index.php </IfModule>