Skip to content

Instantly share code, notes, and snippets.

@mgussekloo
Created November 16, 2017 11:14
Show Gist options
  • Save mgussekloo/1be25dcd1b3bfc5e59cc7488d4a26575 to your computer and use it in GitHub Desktop.
Save mgussekloo/1be25dcd1b3bfc5e59cc7488d4a26575 to your computer and use it in GitHub Desktop.
Nginx config to map single page in Wordpress onto its own domain
rewrite ^([^.]*[^/])$ $1/ permanent;
location ~* \.(css|js|eot|ttf|ttc|otf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
location /mathematics/ {
try_files $uri $uri/ /index.php?$query_string;
}
location /wp-content/ {
try_files $uri $uri/ /index.php?$query_string;
}
location / {
proxy_pass http://mathematics.localhost/mathematics/;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment