• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI4 Base URL Behavior

CI4 used to figure out the base URL all by itself. Now it doesn't even try. I get an error if I don't specify it. Why is this?

I have development, testing, staging, and production environments. I have to maintain separate .env or App.php config files for each environment. 

Also, more importantly we play games with the URLs. For example on our Drupal sites we have the same code/server running under prod-bnc3-web6 and bnc.uscourts.gov. And it works if you just stick to relative URLs. Why can't I do this with CI4? It appears when I do a redirect the URL is changed to whatever the base URL is set to in .env or App.php. This is appears to be a problem.
Simpler is always better

By default it forces you to set a base url as a security measure. There's nothing stopping you from modifying the config file to scope out the current domain and use that. I've seen that done on a lot of CI3 sites in the past.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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