Emil Moe
Emil Moe

Reputation: 389

Routing to domain root

I'm trying to set up a Laravel 4 environment, but when I'm linking to a sub-page it redirects immidiately to domain.com/route_name.

For instance on the page http://domain.com/public/ I have a link to a sub page called profile:

{{ HTML::linkRoute('profile', 'Profile') }}

In my routes.php it would look like this:

Route::get('profile',
  array(
    'as' => 'profile',
    'uses' => 'ProfileController@getIndex'
    )
  );

But instead it redirects all requests to http://domain.com/public/profile to http://domain.com/profile. Why so? I haven't been able to find a setting for it yet.

Edit Realised if I make a prefix (just anything), it will work, however it will load the URL http://domain.com/public/prefix/profile. So not a permanent solution.

Upvotes: 0

Views: 302

Answers (1)

Valentin
Valentin

Reputation: 602

It is definitely not optimal, but you can probably modify the base URL in you app/config/app.php file to http://domain.com/public.

Upvotes: 1

Related Questions