Welcome Guest, Not a member yet? Register   Sign In
How can I redirect in Controller?
#5

(This post was last modified: 01-25-2018, 08:31 AM by iceleo.)

Hi,

I have test in other hosting, it works with two method redirect('somewhere') and redirect()->to('somewhere'). Maybe, I have problem with this hosting. I'm sorry about that. 

But I have another problem, the redirect always redirect to base URL. Example:

The base URL: https://mydomain.com/path/
I want redirect https://mydomain.com/path/admin to https://mydomain.com/path/admin/login if not logged in.
My redirect code is
PHP Code:
return redirect()->to('admin/login'); 
And the redirect is: https://mydomain.com/admin/login

I think I defined $baseURL correctly.

PHP Code:
public $baseURL 'https://mydomain.com/path/'

Thanks!
Reply


Messages In This Thread
How can I redirect in Controller? - by iceleo - 01-25-2018, 02:04 AM
RE: How can I redirect in Controller? - by iceleo - 01-25-2018, 06:25 AM
RE: How can I redirect in Controller? - by iceleo - 01-25-2018, 08:30 AM
RE: How can I redirect in Controller? - by RobT - 10-30-2019, 04:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB