If I access my current test-project on root (http://--website--.we/) the loading time takes 5.22s. If I access any subsite (http://--website--.we/login), which refers to the very same files (since there is a htaccess "FallbackResource /index.php") the load time is okay.
I already tried to remove all Javascripts, and analyzed the site with firefox developer tools and chrome developer tools
<div class="container-fluid">
<?php
$path = explode('/', ltrim($_SERVER['REQUEST_URI'], '/'));
if(empty($path[0])) { // No path elements means home
Print ("home");
include ("inc/login.inc.php");
} else switch(array_shift($path)) // Pop off first item and switch
{
case 'login':
include ("inc/login.inc.php");
break;
default:
break;
}
?>
<div id="server-results"><!-- For server results --></div>
</div>
EDIT:
found out that if I remove my htaccess file its working fine. The file only has got one line
FallbackResource /index.php
SOLUTION:
The Problem is some Bug with Apaches "FallbackResource". I simply had to add two lines in my htaccess file:
DirectoryIndex disabled
DirectoryIndex index.php
FallbackResource /index.php
As seen here: https://serverfault.com/questions/559067/apache-hangs-for-five-seconds-with-fallbackresource-when-accessing