I have a list of rewrite rules stored in my website's .htaccess file, rewriting URL's like http://example.com/cloud/something
to http://example.com/cloud/index.php?page=something
.
These rules worked perfectly when I was on a server with Apache 2.4.7, however I'm now working on a server with Apache 2.2.22 (not my choice) and for some reason these rules do not work.
htaccess file:
RewriteEngine On
RewriteBase /cloud/
RewriteCond %{THE_REQUEST} \ /+cloud/(?:index\.php|)\?page=([^&]+)/(&|\ |$)
RewriteRule ^ %1/ [L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [L,QSA]
Whenever I'm trying to access a page with its explicit URL (index.php?page=something
) it's working, however trying the short way results in a 404 Page Not Found response.
I checked Apache's error.log file and saw that every time I tried to access one of these URL's a new error appeared:
[error] [client 10.0.0.90] Negotiation: discovered file(s) matching request: /var/www/cloud/settings (None could be negotiated)
What might be the problem? Why isn't it working?