Categories

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

Created on:Tuesday, 07 April 2015 00:00

Although this is something useless and without any advantage, you may want to rewrite sitemap links using aliases. To do this 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:

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, for example just after the initial 'RewriteEngine On' rule.

Notice that if your Joomla website is multilanguage you have to specify the language part in the htaccess rule as well, for example for the English language the htaccess rule will be as the following:

Development

Customizations

Ask for customizations of our extensions and we'll develop for you

Support

Support ticketing system to solve problems quickly

Updates

1 year free updates included from the date of the purchase

This site uses technical and third parties cookies in order to improve your experience. By closing this banner, scrolling this page or by clicking any elements on this site you consent to the use of cookies. Click to learn more