![]() |
I installed CI 4.2 on web hosting server and did following changes:
1. app/config/app.php -> public $baseURL = 'http://myurl.com/ci4/public/' 2. myurl.com/ci4/env to .env renamed 3. in .env file uncomment and set its value -> CI_ENVIRONMENT = development 4. in .env file change app.baseURL value -> 'http://myurl.com/ci4/public/' still doesnt show up, thanks (06-12-2022, 12:36 AM)univerbau Wrote: I installed CI 4.2 on web hosting server and did following changes:
(06-12-2022, 12:36 AM)univerbau Wrote: I installed CI 4.2 on web hosting server and did following changes: My suggestions are as follows: (1) Install CI4 using composer (2) Move ".htaccess" and "index.php" files from ci4->public folder to the ci4 root folder. (3) edit index.php file and change line 20 from [require FCPATH . '../app/Config/Paths.php';] to [require FCPATH . '/app/Config/Paths.php';]. (4) rename "env" file to ".env" file (5) edit .env file change - [CI_ENVIRONMENT = production] to [CI_ENVIRONMENT = development] - [app.baseURL = ' '] to [app.baseURL = 'http://<hostname>/ci4/' (enter you host name). (6) To run your instance enter the URL: http://<hostname>/ci4. (no need to enter 'public" folder name in the url. Thats it. (06-13-2022, 06:54 AM)murugappan Wrote: (2) Move ".htaccess" and "index.php" files from ci4->public folder to the ci4 root folder. There are so many places that suggest like that, but it is definitely wrong way. Because index.php was moved to public/ intentionally for security reasons. The right and easy way is to set your Document Root to the public/ folder. If your hosting service does not provide a way to change the Document Root, you have to use the wrong way. But I recommend you use another hosting services that can do it. (06-13-2022, 05:39 PM)kenjis Wrote:(06-13-2022, 06:54 AM)murugappan Wrote: (2) Move ".htaccess" and "index.php" files from ci4->public folder to the ci4 root folder. ok, looks like this was a problem, thanks alot guys ![]() |
Welcome Guest, Not a member yet? Register Sign In |