I'm trying to allow Clean-Urls, having MultiViews enabled.
All the pages I have, are in the root folder itself.
I am trying to achieve the following :
(current-status -> what I am trying to achieve)
1. foo.com/services.php -> foo.com/services
2. foo.com/services == foo.com/services/
3. foo.com/services.php/second-level/ == foo.com/services/second-level
The services is not a folder, I explode $_SERVER['PATH_INFO'] and get the second-level path data.
I have already achieved the first one, but it fails when I enable MultiViews, using a .htaccess file and writing a rewrite.
Options +Indexes +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) $1.php [L]
(Which would obviously fail, since it would change the request to services/second-level.php).
I know I can write multiple rewrites in the .htaccess, and conditionally redirect.
But the strange fact is that on the live environment (shared hosting), it is working, without any .htaccess file in the root folder. Since it is a shared hosting, I cannot read the configuration file.
Any ideas on what configuration should I change (in apache.conf or *.conf) to achieve the above?
If it matters, I'm using Apache/2.2.22, and this problem started happening after the update.