The site map of the website is created with php (sitemap.php).
It is displayed even if it is accessed by sitemap.xml with .htaccess.
RewriteRule ^ sitemap \ .php $sitemap.xml [R = 301, L]
Because the same content is displayed even if it is accessed with sitemap.php in the above,
Is there a way to rewrite sitemap.php access without redirecting to sitemap.xml?
I asked a question to study.
Answer # 1
I don't know what I want to do, but should I rename sitemap.php to sitemap.xml?
Then let PHP process it.
<Files "sitemap.xmp"> SetHandler application/x-httpd-php or somehow, description which shows PHP in own environment </Files>
- what should i do if i want to exclude only the top page in the htaccess 301 redirect when moving the site?
- php - about the position to write new code in the "htaccess" file
- php - how to enable reading and writing htaccess
- php - where to do it? redirect processing
- php - separate the redirect destination when not logged in with laravel multi-authentication
- htaccess - how to redirect
- php - in the htaccess description
- i want to redirect only a specific directory with htaccess
- php - regarding redirect processing in laravel
- php - canceling the redirect
- php - if you change the site address on wordpress, it will redirect to other domains without permission
- i can't redirect individual pages with htaccess
- server - 301 redirect with htaccess
- php - i want to display an error or redirect
- i want to redirect from https: // to http: // by htaccess with eccube3
- to redirect from the root directory to the subdirectory wordpress with htaccess
- php - i want to redirect to the original page after logging in
- apache - i have a question about how to redirect htaccess 301
- doe on how to loop php up to the value of a variable
- php - htaccess file description method
- php : Safari downloads the file instead of opening the page
- php : Please help with redirect
- php : Unable to Check HTAccess File, Ensure It Is Readable HTCCESS Error
- php : How to fix a 404 error on the site?
- php : Rules rewriting rewriterule
- php : Why am I getting error 504 when trying to get to the product page?