ClaytonDaniels
ClaytonDaniels

Reputation: 523

Joomla and the default index.php added to the URL

OK, I'm mainly curious on this issue...

Why do Joomla sites (maybe others as well, I just use Joomla) have the index.php added to the URLs of the web site.

I know how to remove it, using .htaccess, so that's not the issue, I'm mainly just curious as to why a site would want http://www.xxxx.org/index.php/contact-us/ as a URL?

Shouldn't it ALWAYS be http://www.xxxx.org/contact-us/, isn't that the way search engines want it?

Am I missing the point of having the index.php affixed the to URL? What is it's purpose?

Can anyone shed some light on this?

Upvotes: 0

Views: 2164

Answers (1)

ilias
ilias

Reputation: 1345

The reason that joomla uses the index.php in it's links is that the root index.php file is the main entry point for every application that runs on the site. All functions specific for showing content and manage the appearance get called inside this file. If you take a look at any of the joomla extension and core files you'll see a line at the beginning defined(_JEXEC) or die('restricted access') this constant is set at the index.php file and that is done to prevent direct access to those scripts from outside the joomla environment. For example if you were to restrict content using the joomla ACL passing all the requests from the root index.php file ensures that the user will have the appropriate privileges to access that page. That is also the reason of the separate index.php file inside templates. See this answer for more: why not use html templates in joomla?.

Upvotes: 2

Related Questions