Created
September 17, 2013 19:18
-
-
Save marcjenkins/6599326 to your computer and use it in GitHub Desktop.
Quick and easy way to create a htaccess file for multiple WordPress domains.
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
<IfModule mod_rewrite.c> | |
RewriteRule . - [E=rwbase:/] | |
RewriteCond %{HTTP_HOST} localhost$ | |
RewriteRule . - [E=rwbase:plausiblethought/] | |
RewriteCond %{HTTP_HOST} staging.plausiblethought.co.uk$ | |
RewriteRule . - [E=rwbase:plausiblethought/] | |
RewriteEngine On | |
RewriteBase /%{ENV:rwbase} | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /%{ENV:rwbase}index.php [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://plausiblethought.net/handling-htaccess-in-multiple-wordpress-environments for details.