Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Laravel Routing Issue

My setup currently looks like this

application/controllers/register.php

class register_Controller extends Base_Controller
{
    public $restful = true;
    public function get_index()
    {
        return View::make('main.register');;
    }
}

routes.php

Route::controller(Controller::detect());
Route::any('/', function()
{
    return View::make('main.index');
});
Route::any('register',function()
{
    return View::make('register.index');
});

mydomain.com works.

mydomain.com/index gives a laravel 404

mydomain.com/register gives a standard 404

What's strange is that shouldn't mydomain.com/register give me a laravel 404 error? This page indicates that WAMP was the cause, but my setup is on a Ubuntu VM running PHP5, Apache2, and mySQL.

like image 579
wonton Avatar asked Aug 20 '12 22:08

wonton


1 Answers

With mod_rewrite on, try setting in apache configurations "AllowOverride All", it fixed it for me.

like image 197
wonton Avatar answered Oct 26 '22 02:10

wonton