Created
August 25, 2015 11:29
-
-
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
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
# 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