CodeIgniter Forums
Ci4 on subfolder - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: Ci4 on subfolder (/showthread.php?tid=78045)

Ci4 on subfolder - pippuccio76 - 11-24-2020

Hi , sorry for english , i installed a ci4 application on subfolder , set the base url and the base controller .
If i go to base url ( i redirected to the base controller (user) and because im not logged to the user/login ( ) . If i modify the url eliminating login im redirecting to with 404 page why ?

RE: Ci4 on subfolder - cseon - 11-24-2020

Hi, sorry for my english too !
For using ci4 in a subfolder I create a subdomain and modify the DNS to target the url I want.
After nothing special to do in ci4 installation.

RE: Ci4 on subfolder - InsiteFX - 11-24-2020

You need to set your new path locations.

See .app/Config/Paths.php

RE: Ci4 on subfolder - pippuccio76 - 11-25-2020

(11-24-2020, 06:55 PM)InsiteFX Wrote: You need to set your new path locations.

See .app/Config/Paths.php

this is my structure folder :

inside / 
-other domain

inside my_domain

inside ci 4:

this is codeigniter:

Must i change config path ? it don't work if became the url became automatically  (without ci4).

if i see automatically became (because user it's the default controller login because im not autenticated)

RE: Ci4 on subfolder - InsiteFX - 11-25-2020

Your bas3e_url should be like this, I really don't understand why users keep move CodeIgniter
arround? You can keep the same structure and then just drop it in a sub folder and set the

PHP Code:
// .app/Config/App.php
public $baseURL ''

RE: Ci4 on subfolder - includebeer - 11-25-2020

I had troubles in the past setting up CI4 in a subdirectory like you did. There was some bugs with the redirections, even if the baseURL is correctly configured. I highly recommend you set up a subdomain like instead of a subdirectory. It will save you some headaches!