Skip to content

Instantly share code, notes, and snippets.

View Horttcore's full-sized avatar
💭
Available

Ralf Hortt Horttcore

💭
Available
View GitHub Profile
@Horttcore
Horttcore / .htaccess
Last active June 26, 2020 09:52 — forked from stevegrunwell/.htaccess
Load production WordPress uploads in a local version of the site by putting this in a new Htaccess file in /wp-content/uploads/
# Attempt to load files from production if they're not in our local version (replace {SITE URL} with your production server)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$
RewriteRule ^(.*)$ https://{SITE URL}/$1 [QSA,L]
</IfModule>