CodeIgniter Forums
Remove the need for entering the base url on config.php, have no base url - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forum-29.html)
+--- Thread: Remove the need for entering the base url on config.php, have no base url (/thread-68415.html)



Remove the need for entering the base url on config.php, have no base url - desbest - 07-07-2017

Hello I have a feature request.
Remove the need for entering the base url on config.php, have no base url
Why should I have to change a variable each time I upload my codeigniter app/script to a new location? It's annoying.


RE: Remove the need for entering the base url on config.php, have no base url - skunkbad - 07-07-2017

If you're doing a lot of custom installations, you should create and use a shell script. I do this when I set up Community Auth, and I can do a complete install in about 5 seconds.


RE: Remove the need for entering the base url on config.php, have no base url - Aisfrond - 07-08-2017

(07-07-2017, 04:03 PM)desbest Wrote: Hello I have a feature request.
Remove the need for entering the base url on config.php, have no base url
Why should I have to change a variable each time I upload my codeigniter app/script to a new location? It's annoying.

PHP Code:
$config['base_url'] = ( isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == "on" "https://" "http://" ) .$_SERVER['SERVER_NAME'].'/'



RE: Remove the need for entering the base url on config.php, have no base url - Paradinight - 07-08-2017

(07-08-2017, 03:16 AM)Aisfrond Wrote:
(07-07-2017, 04:03 PM)desbest Wrote: Hello I have a feature request.
Remove the need for entering the base url on config.php, have no base url
Why should I have to change a variable each time I upload my codeigniter app/script to a new location? It's annoying.

PHP Code:
$config['base_url'] = ( isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == "on" "https://" "http://" ) .$_SERVER['SERVER_NAME'].'/'

possible security hole Angel


RE: Remove the need for entering the base url on config.php, have no base url - engrChid - 09-01-2017

the "shell script"  by @skunkbad can be be inbuilt to save the developer the time of entering it himself.