Skip to content

Instantly share code, notes, and snippets.

@w-jerome
Last active September 29, 2020 08:42
Show Gist options
  • Save w-jerome/847ef1a86dd3764388eee13b01182680 to your computer and use it in GitHub Desktop.
Save w-jerome/847ef1a86dd3764388eee13b01182680 to your computer and use it in GitHub Desktop.
WordPress - Redirect image upload from local to prod
RewriteEngine On
RewriteBase /
RewriteRule ^(wp-content/uploads/.*) https://www.my-web-site.com/$1 [L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment