Fixing bug when browser is pointed at www.example.com/folder/file.php