kovpack
kovpack

Reputation: 5045

Laravel 4.2 route Redirect not working properly

In my LoginController I have

return Redirect::route('admin.login.index')->withInput(Input::except('password'));

But instead of redirecting me to

http://site_corporate/admin/login

it redirects to

http://site_corporate/http://site_corporate/admin/login

This one works as expected:

return Redirect::to('admin/login')->withInput(Input::except('password'));

but I want to use named routes instead of this.

Upvotes: 0

Views: 2069

Answers (1)

lowerends
lowerends

Reputation: 5267

The reason is that you have an underscore in your domain name, which makes it effectively an invalid domain according to the Laravel implementation. It has once been logged as a bug in Laravel (https://github.com/laravel/framework/issues/2511).

To solve this, you should remove the underscore from your domain name.

Upvotes: 3

Related Questions