webinoly/templates/template-yoast-sitemap
Cristhian Martínez Ochoa e87cbad39c yoast-sitemap on/off command
New option to enable or disabled the Yoast Sitemap default support.
2018-08-20 20:43:26 -06:00

15 lines
768 B
Plaintext

# YoastSitemapStart - Yoast SEO Plugin
location ~ ([^/]*)sitemap(.*)\.x(m|s)l$ {
rewrite ^(.*)/sitemap\.xml$ $1/sitemap_index.xml permanent;
rewrite ^.*/([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
# Rules for yoast sitemap with wp|wpsubdir|wpsubdomain
rewrite ^.*/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^.*/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
# Following lines are optional. Needed for Yoast Premium.
rewrite ^.*/news_sitemap\.xml$ /index.php?sitemap=wpseo_news last;
rewrite ^.*/locations\.kml$ /index.php?sitemap=wpseo_local_kml last;
rewrite ^.*/geo_sitemap\.xml$ /index.php?sitemap=wpseo_local last;
rewrite ^.*/video-sitemap\.xsl$ /index.php?xsl=video last;
access_log off;
}
# YoastSitemapEnd