Running Apache on Mac Snow Leopard (ie Web sharing enabled).
Paths are evaluating in ways not expected:
example.com/folder is returning a file (sans exception) instead of a folder.
If I make a call to example.com/events/March and I have a file events.php in my root directory, Apache returns that page, and the rest of the path is ignored.
Furthermore, this call takes precedence over the commands in .htaccess
RewriteEngine on RewriteRule ^events/(.+)/?$ events.php?month=$1
If the events.php doesn't exist (let us say it is called eventsHandler.php), then the above rewriteRule works wonderfully. So I know it is not an issue with the .htaccess
I've tried to make file extensions visible, it has not helped.
So the questions are:
- Why does Apache on Mac drop the file extension and treat the file as a folder?
- Why doesn't the .htaccess overrule this?
- How do I fix this, that it should just work?