So, I am playing with urls a bit with a PHP app I am building.
I am using mod_rewrite using .htaccess. Here is what that looks like:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1
</IfModule>
I thought if a URL was written like below:
http://localdomain.com/controller
I would expect 'controller' ending without issues as part of the $_SERVER['PATH_INFO']. However, on Ubuntu 12.04 running Apache 2.2.22 I get a 404 Not Found error instead:
NOT FOUND
The requested URL /index.php/controller was not found on this server.
It appears that 'controller' is being properly addressed after a slash following index.php, but Does anyone have any idea why I am getting a 404 instead of the expected response?
Ultimately I am trying to capture the 'controller' to use in an MVC framework I am building.
In this case I have a very simple index.php with ONLY the following:
<?php
echo $_SERVER['PATH_INFO'];
Yet, I still get a 404 error instead of the expected path info.
NOTE: Going to just http://localdomain.com/ or http://localdomain.com/index.php work perfectly. mod_rewrite is on and working, and AllowOverride is set to All.