This is literally my first day using PHP. I’ve never seen it until today, so please go easy on me. I can’t understand why one of the urls doesn’t work.
/* http://localhost works so I know this path is all set up */
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
/* http://localhost/pages/ or http://localhost/pages/about is
"Requested URL pages not found" even though it points
to the same known working path */
Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display', 'home'));
I have Configure::write('debug', 2); in core.php.
In this same Ubuntu box I was playing with pure PHP and strangely whenever I used that the _POST array was empty, no matter what the form tried to do. Do I have some setting that says no input except '/' is allowed?
The other links are dependent on mod_rewrite.
Please ensure that mod_rewrite is enabled via:
sudo a2enmod rewrite
You will need to restart your server via:
sudo /etc/init.d/apache2 restart
Lastly, you will need to make sure your vhost does not have AllowOverride set to none.
For testing, you can set it to All. You will need to restart your server again if you need to change this.