Skip to content

Instantly share code, notes, and snippets.

@marcjenkins
Created September 17, 2013 19:18
Show Gist options
  • Save marcjenkins/6599326 to your computer and use it in GitHub Desktop.
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.
<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>
@marcjenkins
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment