I'm using the php library tonic for web services. My resource is as example at
Now if a file myResource.php exists in that directory, the url mod_rewrite gets to see is
which then fails the rewrite conditions and my application breaks (app works on apache on windows)
If I rename myResource.php to my myResourceClass.php (or anything else), it works.
So it seem that apache or one if its modules assumes that with base-uri/myResource I want to call base-uri/myResource.php but only if myResource.php exists.
Is this a general issue or can I somewhere configure this to not happen?
The answer contains the same observation!
The issue is the default Apache configuration on Ubuntu:
Options Indexes FollowSymLinks MultiViews
MultiViews is changing request_uri from myResource to myResource.php.
- disable MultiViews in .htaccess: Options -MultiViews
- remove MultiViews from default config
- rename the file as example to myResourceClass
I chose last option because that should work regardless of configuration and I only have 3 such files so the change took about 30 secs...