Welcome Guest, Not a member yet? Register   Sign In
CI in apache userdirs (domain.com/~user/public/ci)
#1

Hello,

I operate a shared hosting environment on Ubunutu 20 for a course I teach. Each student of the course is allocated a user account with a ~/public/ directory for development.

I am having difficulty getting CI4 to find controllers properly when the starter app is installed into a subdirectory of a user's public directory. 

The directory structure looks like this:
/home/username/public/ci4/app | system | public | etc.

The url for the app then looks like:
http://domain.com/~username/ci4

This "works" insofar as apache is serving code igniter. However, CI throws a 404:

Quote:Controller or its method is not found: \App\Controllers\~username::ci4


So this is a routing issue? I have set the base url in .env and tried adjusting the rewrite base in ~/public/ci4/public/.htaccess with various permutations of the url.

How do I get CI to use the correct base for routing in this situation?

Thanks!
Evan
Reply


Messages In This Thread
CI in apache userdirs (domain.com/~user/public/ci) - by evansharp - 03-18-2021, 03:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB