Y
Y
ygen2020-08-03 13:59:25
Nginx
ygen, 2020-08-03 13:59:25

How to set up sitemap.php to be treated as sitemap.xml on nginx?

Hello.

Costs nginx php-frm. Through Httaccess, everything is simply configured: #Access

sitemap from sitemap.xml to sitemap.php
RewriteRule ^sitemap\.xml$ sitemap\.php [L]

but how to configure the same for nginx?

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-08-03
@ygen

rewrite ^/sitemap\.xml$ /sitemap.php last;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question