All URLs generated by Jommla have index.php/ inside them which will cause 404 Not found error.
Steps to reproduce:
If you go to a page like about your home page you will see that only HTML is loading and the rest of page is failing(404 Not found
).
I dug into Joomla's source code and found out that problem is in libraries\joomla\uri\uri.php
and a static function named base
. When you browse the page I said, your URL will be like http://example.com/index.php/4-about-your-home-page
. In that function you have a piece of code like this:
if (strpos(php_sapi_name(), 'cgi') !== false && !ini_get('cgi.fix_pathinfo') && !empty($_SERVER['REQUEST_URI']))
{
// PHP-CGI on Apache with "cgi.fix_pathinfo = 0"
// We shouldn't have user-supplied PATH_INFO in PHP_SELF in this case
// because PHP will not work with PATH_INFO at all.
$script_name = $_SERVER['PHP_SELF'];
}
else
{
// Others
$script_name = $_SERVER['SCRIPT_NAME'];
}
After if
, $script_name
will be index.php/4-about-your-home-page
and static::$base['path']
will be index.php
instead of empty string.
php_sapi_name() === "fpm-fcgi"
$_SERVER['SCRIPT_NAME'] === 'index.php/4-about-your-home-page'
$_SERVER['PHP_SELF'] === 'index.php/4-about-your-home-page'
Screenshots:
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-07 10:48:47 |
Closed_By | ⇒ | jeckodevelopment |
This is not a Joomla issue.
This is an incorrectly configured server.