Open danielbarenkamp opened 6 years ago
Hello,
I am trying to enable Yoast SEO and also add trailing slash to all urls.
rewrite ^([^.]*[^/])$ $1/ permanent;
The problem i am having is that my root page http://www.domain.com is redirecting to http://www.domain.com/index.php/ adn not to http://www.domain.com/
also http://www.domain.com/sitemap.xml is not working.
Do you have nay solution on this?
I am also using expanded code for Yoast
location ~ ([^/])sitemap(.).x(m|s)l$ { rewrite ^/sitemap.xml$ /sitemap_index.xml permanent; rewrite ^/([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 last; rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last; rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php? sitemap=$1&sitemap_n=$2 last;
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; }
+1
+1
Please add the following lines to a global file for Yoast XML Support:
rewrite /sitemap_index.xml$ /index.php?sitemap=1 last; rewrite /([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;