user3337395
user3337395

Reputation: 3

Sitemap XML and Sitemap PHP

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

Answers (1)

RazvanZ
RazvanZ

Reputation: 218

Try this:

RewriteRule sitemap$ sitemap.php
RewriteRule sitemap/$ sitemap.php

Upvotes: 2

Related Questions