CodeIgniter Forums
problem with base_url - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: problem with base_url (/showthread.php?tid=78824)



problem with base_url - music_ed - 03-15-2021

Hello you all,
I have some strange problem with my CodeIgniter app.
when I started writing the application I ran CodeIgniter via Spark.
So the App run on http://localhost:8080 Now I want to run via MAMP and a virtual Host. I set yp the virtual host and it works.
I redefined public $baseURL = 'http://dummy.example.org/'; in app/configu/App.php and in the .env (app.baseURL = 'http://dummy.example.org/';)
When I call http://dummy.example.org, the page shows but any link with base_url() points to localhost:8080 instead of the domain.
I double checked both place and the information is correct. The virtual host points to the public dir.
I searched my projectfolder for "localhost:8080 and replaced every instance with dummy.example.org so there shouldn't be any instance left.
Still it doesn't work. I restarted my computer, restarted MAMP Pro (6.3), but nothing helps.
Does anybody have an idea?


RE: problem with base_url - InsiteFX - 03-15-2021

Try clearing your web browser cache it will hold the old url's.


RE: problem with base_url - music_ed - 03-15-2021

(03-15-2021, 08:45 PM)InsiteFX Wrote: Try clearing your web browser cache it will hold the old url's.
Thanks for the suggestion, but that didn't work. Even using another browser that never was used for this site didn't work.