• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI in apache userdirs (domain.com/~user/public/ci)


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:

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?


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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.