Welcome Guest, Not a member yet? Register   Sign In
subdomain is lost on redirect()->to()
#3

Have you tried using
PHP Code:
current_url() 

which will return the full url (including segments that you can strip out) in your redirect statement?

So it could possibly look like this:

PHP Code:
$url =  str_replace("/unwanted/segments""/search"current_url());

retrun redirect()->to($url);

//or if you have no segments

$url current_url() . "/search";

return 
redirect()->to($url); 
Reply


Messages In This Thread
RE: subdomain is lost on redirect()->to() - by kick - 05-15-2020, 11:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB