Is this possible? I've been struggling the whole weekend this htaccess nightmare...
Rules:
1. www.example.com/index.php -> throw 404 error (the file does exist)
2. www.example.com -> load the index.php (even if its blocked by direct access)
3. www.example.com/index -> throw 404 error
Currently, all these addresses give me the same site; I have no idea why "www.exaple.com/index" works as a valid address by the way.
These rules must work on the whole domain (my htaccess is in the root directory).
So what I want to basically do is make all URL with something after the slash (/) return 404 (not "Forbidden") but still allow access without anything after the slash. Must also work for all folders and any file (my server automatically knows that "index.php" is the default file to load).
Huge thanks in advance.
[edited by: jdMorgan at 12:58 am (utc) on Apr 26, 2010]
[edit reason] Please use eaxmple.com only. [/edit]