Fix for rewriting directory name all the time
Added code so we no longer have to change index.php