When I access my site on MAMP like so, it works great
localhost/site/about-us/
When I upload it to my remote server, and access it like this
all requests go back to the 'default' set up in bootstrap.php
.
Here is my route setting.
Route::set('default', '(<page>)')
->defaults(array(
'page' => 'home',
'controller' => 'page',
'action' => 'index',
));
The problem is, whenever it gets uploaded to my server, any request like /about-us/ is always defaulting to home as specified when setting the route. If I change that default to 'about-us', every page goes to 'about us'.
Does anyone know what may be causing this? Thanks
UPDATE
Here is a hack that works, but is sure ugly as hell. Still I'd prefer to know why it doesn't work as per expected.
// Hack because I can not get it to go to anything except 'default' below...
$uri = $_SERVER['REQUEST_URI'];
$uri = str_replace(url::base(), '', $uri);
$page = trim($uri, '/');
if ( ! $page) $page = 'home';
Route::set('default', '(<page>)')
->defaults(array(
'page' => $page,
'controller' => 'page',
'action' => 'index',
));