How can I redirect in Controller? |
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'); I think I defined $baseURL correctly. PHP Code: public $baseURL = 'https://mydomain.com/path/'; Thanks! |
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 jreklund - 01-25-2018, 03:10 AM
RE: How can I redirect in Controller? - by iceleo - 01-25-2018, 06:25 AM
RE: How can I redirect in Controller? - by kilishan - 01-25-2018, 07:16 AM
RE: How can I redirect in Controller? - by iceleo - 01-25-2018, 08:30 AM
RE: How can I redirect in Controller? - by jreklund - 01-25-2018, 02:34 PM
RE: How can I redirect in Controller? - by RobT - 10-30-2019, 04:54 AM
|