Port to the world of technology

I'm in Nginx ubuntu...
 
Notifications
Clear all

I'm in Nginx ubuntu `18 server in Vultr. I can't view Site map  


thili2
Posts: 1
(@thili2)
New Member
Joined: 6 months ago

i'm in Nginx ubuntu `18 server in Vultr. I can't view Site map. I searched about this and found .htaccess solution. but Nginx does not support for that. 

Reply
Topic Tags
1 Reply
Posts: 8
Admin
(@admin)
Member
Joined: 1 year ago

Open Nginx Conf file

sudo nano /etc/nginx/nginx.conf

and put this code to it

# Rewrites for XML Sitemap
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
Reply
Share: