Created
September 21, 2020 23:19
-
-
Save mcascardi/a5e3f84f111546df18fed7a4960498ee to your computer and use it in GitHub Desktop.
A configuration snippet for spoofing the uploads directory in a WP local development environment.
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
| # Apache example configuration, added inside the <VirtualHost> directive, or root server block if VirtualHost is not being used. | |
| <Directory "${SRVROOT}/htdocs/www.example.local/wp-content/uploads"> | |
| <IfModule mod_rewrite.c> | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule (.*) https://www.example.com/wp-content/uploads/$1 [L,R,NE] | |
| </IfModule> | |
| </Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment