Created
August 11, 2019 20:09
-
-
Save larscmagnusson/a49d59305cd39b2df97a5a0ac5aae0f5 to your computer and use it in GitHub Desktop.
Wordpress images from livesite
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> | |
# Get images from livesite if not on local | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www.LOCALSITE.com$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*\.(gif|jpg|png))$ https://www.THELIVESITE.com/$1 [R=301,L] | |
# Wordpress permalinks | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment