• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't Redirect Well In Codeigniter 4

#1
Hello My Pros,
How are you today please I am having issue to redirect to page.

I customise my app/Config/App.php by adding constructor to it where I auto set the base url like this
PHP Code:
public function __construct()
{
$root = (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS']) ? "https://" "http://") . $_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']), ''$_SERVER['SCRIPT_NAME']);

$this->baseURL $root;

I want to redirect to localhost/aensd/login
Where aensd is the folder where my application is stored
And It redirect to localhost/login instead of localhost/aensd/login calling error 404


PHP Code:
if ($users->save($user))
{
// Success!

return redirect()->route('login')->with('message'lang('Auth.registerSuccess'));



please help me on this
Visit Chivins.Com For Free Tutorial on Codeigniter
Reply


Messages In This Thread
Can't Redirect Well In Codeigniter 4 - by Chivinsdev - 10-16-2019, 07:17 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.