triming "index.php" from the request URI
added ltrim and rtrim method (they aren't equal to standard functions)