Sitemap.php for Sitemap.xml

0

Can anyone help me? I made a "sitemap.php" file all ok, only I want it to be accessible in "sitemap.xml" too.

My .htaccess;

<IfModule mod_rewrite.c>
    DirectoryIndex index.php
    RewriteEngine on
    RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico|favicon.ico)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ ./index.php/$1 [L,QSA] 
</IfModule>
<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>  
# CONFIGURAR UTILIZAÇÃO DO HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://meusite.com/$1 [R,L]

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.meusite.com$ [NC]
RewriteRule ^(.*)$ https://meusite.com/$1 [L,R=301]
    
asked by anonymous 24.06.2017 / 18:02

1 answer

0

People can solve it, I forgot to add .php and .xml in .htaccess;

RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico|favicon.ico|sitemap\.xml|sitemap\.php)
    
24.06.2017 / 19:15