Created
June 19, 2021 06:52
-
-
Save eversionsystems/8ce3d689cb96d22f6147508595b68bd3 to your computer and use it in GitHub Desktop.
Load WordPress server upload directory files from localhost. Circumvent having to download large wp-upload directories so we can load images locally.
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
#Allow us to load images from server instead of having to download them all for large sites | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://yourwebsitename.com/wp-content/uploads/$1 [NC,L] | |
</IfModule> | |
# 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