Skip to content

Instantly share code, notes, and snippets.

@mikaelz
Created August 25, 2015 11:29
Show Gist options
  • Save mikaelz/732758289dd5c1f05f47 to your computer and use it in GitHub Desktop.
Save mikaelz/732758289dd5c1f05f47 to your computer and use it in GitHub Desktop.
htaccess for WordPress on localhost in subfolder with uploads redirect match to fetch uploads from internet
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /example/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /example/index.php [L]
# Fetch uploads from public URL
#RedirectMatch 301 /uploads/(.*)$ http://www.example.com/wp-content/uploads/$1
</IfModule>
# END WordPress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment