1
I have this excerpt on .htaccess
that is working for my current need:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . index.php [L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
I am mounting a PHP file that generates dynamic sitemap and need to add this line after the RewriteEngine On
:
RewriteRule ^sitemap\.xml$ gera_xml.php [L]
The idea is that if I put www.site.com.br/sitemap.xml
, it presents the sitemap in XML, but it does not work at all.
I’ve changed positions and nothing. I changed the instruction and gave error in the page.