CodeIgniter Forums
How to access CI4 on live server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: How to access CI4 on live server (/thread-74426.html)



How to access CI4 on live server - TamasD - 09-21-2019

Hi,

I installed CI4 on a live shared hosting in a subdirectory. I can access it by going to http://mysite/ci4/public

but how can I access the default controller if I want to use http://mysite/ci4/

I already set the base url in App.php and the env file.


RE: How to access CI4 on live server - ciadmin - 09-21-2019

You have to map the document root to the public folder in your project. It looks like your document root is htdocs (for instance), and it should be htdocs/ci4/public


RE: How to access CI4 on live server - TamasD - 09-22-2019

So I should set the baseurl to http://mysite/ci4/public ?


RE: How to access CI4 on live server - aparedesv - 09-22-2019

Hi,

I have the same problem.

I understand that the base_url is the public path; for example, if your hosting public folder is httpdocs, is here when you upload the CI4 public folder (index.php, robots.txt, favicon.ico & .htaccess), and the rest of CI4 project one folder up..

I try, but doesn't work fine


RE: How to access CI4 on live server - TamasD - 09-22-2019

This thread helped: https://forum.codeigniter.com/thread-74347.html


RE: How to access CI4 on live server - aparedesv - 09-22-2019

(09-22-2019, 02:49 AM)TamasD Wrote: This thread helped: https://forum.codeigniter.com/thread-74347.html

Works perfect!

Thank's