Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Yoast SEO Sitemap XML Support #24

Open
danielbarenkamp opened this issue Aug 28, 2018 · 4 comments
Open

Add Yoast SEO Sitemap XML Support #24

danielbarenkamp opened this issue Aug 28, 2018 · 4 comments

Comments

@danielbarenkamp
Copy link

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;

@stefan0s
Copy link

stefan0s commented Oct 19, 2018

Hello,

I am trying to enable Yoast SEO and also add trailing slash to all urls.

Trailing slash

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?

@stefan0s
Copy link

stefan0s commented Oct 19, 2018

I am also using expanded code for Yoast

#Yoast SEO Sitemaps
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;
}

@ThatMarko
Copy link

+1

1 similar comment
@TimeJunkie01
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants