Mobile app version of vmapp.org
Login or Join
Kevin317

: File priority in Joomla website I have a Joomla site which is hosted on a Linux server which has 2 files, sitemap.xml and sitemap.html. When I try to access example.com/sitemap, sitemap.xml shows

@Kevin317

Posted in: #Htaccess #Linux #Url #Xml #XmlSitemap

I have a Joomla site which is hosted on a Linux server which has 2 files, sitemap.xml and sitemap.html. When I try to access example.com/sitemap, sitemap.xml shows up instead of sitemap.html. Can somebody explain to me how I can change this order? May be from .htaccess?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Kevin317

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

If you create a page using Joomla and call it 'sitemap' it should display the content of that created page in the theme framework 'on the fly' for you. Joomla does not create a sitemap.html or sitemap.php file and put it on your server.

If you created a sitemap.html file separately on your own that will not display unless you save the file to your server and type the full name in the browser. eg. example.com/sitemap.html

You may have a plugin that is creating the sitemap.xml file automatically for you. The plugin compiles the information dynamically for the sake of submitting it to Google Search Console.

All pages are created dynamically calling on information from the MySQL database created by Joomla when you first installed it.

The permalink setting determines the way the page names display. Most choose to display the names using Post name

Common Settings

Plain example.com/?p=123 Day and name example.com/2016/07/30/sample-post/ Month and name example.com/2016/07/sample-post/ Numeric example.com/archives/123 Post name example.com/sample-post/ Custom Structure example.com/%postname%/

The setting you choose for permalinks will trigger Joomla to create and write code in an .htaccess file and put it on your server in the root directory such as example.com/.htaccess

The .htaccess code for Post name permalink settings looks like the following:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme