J!Extensions Store™
Faq How can i rewrite a dynamic xml sitemap url to 'sitemap.xml'?

How can i rewrite a dynamic xml sitemap url to 'sitemap.xml'?

Created on:Monday, 06 April 2015 22:00

You must use the htaccess to rewrite a sitemap link using an alias such as 'sitemap.xml', indeed all sitemap URLs are normally dynamic and no more based on static files. The easiest way to accomplish this, is adding a rule to your htaccess file like the following one:

RewriteRule ^sitemap\.xml$ index.php?option=com_jmap&view=sitemap&format=xml [L]


This is also explained in more details in the pdf docs at the paragraph 'Having dummy sitemap.xml file'.



Take care to the location used to add the rule to your htaccess file. In some cases placing the new rule for the sitemap after other already present rewriting rules could not work. In such case place the new rule before them.