Last active
July 11, 2020 18:20
-
-
Save intsdev/78716cacc6a63dd821e9b322b7564658 to your computer and use it in GitHub Desktop.
Nginx config
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
server { | |
listen 80; | |
server_name mydomain.com; | |
# To remove the trailing slash on all URLs: | |
rewrite ^/(.*)/$ /$1 permanent; | |
# To remove the trailing slash on one page | |
# rewrite ^/page/$ /page permanent; | |
location / { | |
# rewrite rule | |
try_files $uri $uri /index.php?cmsquerystring=$args; | |
} | |
# proxy sitename.com/images to example.com | |
location /images/ { | |
proxy_pass https://example.com/; | |
proxy_hide_header Strict-Transport-Security; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment