-
Hello Team,
Sitemap is loading when i use the www version of my site. https://www.askvikram.com/sitemap_index.xml
However, its not loading with the non www version https://askvikram.com/sitemap_index.xml and not redirecting to www version either.
It shows an empty page but source is available as seen in this link: view-source:https://askvikram.com/sitemap_index.xml
Hence it seems that there is no problem available with source too.
I’ve also added the rewrite rules appropriately in my nginx configuration file as said in your Knowledge base articles.
file contents:
———————————————————————————————————-
user nginx;
worker_processes 1;error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;events {
worker_connections 1024;
}http {
include /etc/nginx/mime.types;
default_type application/octet-stream;log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘
‘$status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for”‘;access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
server {
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
}
}—————————————————————————————————-
Could you please help for solving this.
Regards,
Vikram
The ticket ‘Sitemap not loading in non-www version’ is closed to new replies.