Search code examples
apachedirectoryindex

How to prevent my users from explicitly surfing to /.../index.php?


How do I configure Apache to prevent my users from explicitly surfing to http://myurl/somepath/index.php ' Having index.php attached to the end of the URL looks ugly, to say the least.


Solution

  • Have you tried URL Rewriting? I am not a PHP dev, however I do know that at least in ASP.NET you can setup URL Rewriting at the server level, as well as code level (on individual pages).