21 lines
697 B
Django/Jinja
21 lines
697 B
Django/Jinja
|
|
# try for WordPress index.php in /
|
|
# fall back to index.php + args (passed to php5-fpm later)
|
|
# also serves static files from the disk instead of passing to interpreter,
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
|
|
add_header Cache-Control "public, max-age=604800";
|
|
}
|
|
|
|
# Add trailing slash to */wp-admin requests.
|
|
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
|
|
|
# Yoast SEO plugin
|
|
# https://yoast.com/wordpress/plugins/seo/
|
|
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
|
|
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
|
|
|