Sitemap.php for Sitemap.xml

Asked

Viewed 94 times

0

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

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]
  • The . htaccess is a special file for Apache. When a user is browsing through a page of your site, to every directory they try to access, Apache first looks for the file. htaccess and find, check if there is any restriction or special configuration. https://www.xml-sitemaps.com/ generates the sitemap automatically.

  • Hello Henry already manage to solve how to close the topic?

1 answer

0

People can solve, 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)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.