Last active
December 11, 2015 03:28
-
-
Save davidyell/4538142 to your computer and use it in GitHub Desktop.
.htaccess mod_rewrite utility rules
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
# Pass all the /forums stuff through the routing | |
RewriteCond %{REQUEST_URI} "/forums/" | |
RewriteRule (.*) $1 [L] | |
# If you need to lock down access to a folder, such as a CMS, then use the following | |
RewriteRule ^BusinessThing(.*)$ /maintenance.html [R=301,L] | |
# Redirecting everyone to maintenance | |
# Reference, http://www.techiecorner.com/97/redirect-to-maintenance-page-during-upgrade-using-htaccess/ | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ | |
RewriteRule $ /maintenance.html [R=302,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment