roles/nginx: Add nginx rewrites for Yoast WordPress SEO plugin

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-01-23 12:26:24 +03:00
parent 171798c76d
commit c3bc6d949d
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -13,3 +13,8 @@
# Add trailing slash to */wp-admin requests. # Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent; 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;