Last active
November 18, 2019 09:55
-
-
Save annalinneajohansson/f1129ef57206eb2e523d to your computer and use it in GitHub Desktop.
# Attempt to load files from production if they're not in our local version. Adapted from: http://stevegrunwell.com/blog/keeping-wordpress-under-version-control-with-git
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
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^local.site\.com$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://production.site.com/wp-content/uploads/$1 [NC,L] | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^wp-content/(.*\.(gif|jpg|png)) http://<DOMAIN NAME>/wp-content/$1 [L,R] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment