Reputation: 3
i have on my webserver two different sitemap files
If i call the uri /sitemap it open the sitemap.xml but i want that show the content from the file sitemap.php.
I write following lines in my htacces
RewriteEngine on
RewriteRule sitemap\.xml sitemap.xml
RewriteRule sitemap sitemap.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php
But i have no success, can anyone help me please?
Upvotes: 0
Views: 506
Reputation: 218
Try this:
RewriteRule sitemap$ sitemap.php
RewriteRule sitemap/$ sitemap.php
Upvotes: 2