Last active
March 20, 2023 17:07
-
-
Save IlanVivanco/e041b4301921b17a9240d73599005f03 to your computer and use it in GitHub Desktop.
Rewrite local images to remote server.
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^camunda\.test$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://camunda.com/wp-content/uploads/$1 [NC,L] | |
</IfModule> |
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
# | |
# Static file rules | |
# | |
location ~* \.(?:css|js)$ { | |
access_log off; | |
log_not_found off; | |
add_header Cache-Control "no-cache, public, must-revalidate, proxy-revalidate"; | |
} | |
location ~* \.(?:jpg|jpeg|gif|png|ico|xml)$ { | |
access_log off; | |
log_not_found off; | |
expires 5m; | |
add_header Cache-Control "public"; | |
try_files $uri $uri/ @production; | |
} | |
location ~* \.(?:eot|woff|woff2|ttf|svg|otf) { | |
access_log off; | |
log_not_found off; | |
expires 5m; | |
add_header Cache-Control "public"; | |
# allow CORS requests | |
add_header Access-Control-Allow-Origin *; | |
try_files $uri $uri/ @production; | |
} | |
location @production { | |
resolver 8.8.8.8; | |
proxy_pass https://www.womenspowergap.org/$uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment