Handling trailing slashes

This two URL: */example* */example/* should be identical
Ignoring script name from the URL

This two URL: */index.php/example* */example* should be identical