Welcome Guest, Not a member yet? Register   Sign In
Multiple instances of CI4 and removal of public/index.php/ from url
#5

(This post was last modified: 03-20-2020, 04:34 AM by owino.)

(03-18-2020, 03:54 AM)mjamilasfihani Wrote: You can change the root directory from your server.
Example : before www/dirname/ change to www/dirname/public/

Or you can place your CI asset in another directory and put the content of public in your root then change the config of index.php

Example : www/user/public_html/index.php <- this is public dir
Then I point the codeigniter to www/user/_codeigniter/


Sorry, I should have stated how my folder structure looks. My document root according to the apache2 server is /var/www/html. In this root directory is where I have copies of instances of CI4. So far I have two copies, the one that authenticates users and one that offers a solution to the first problem. Within the root also is an index.php file whose job is simply to direct visitors to the authenticating instance.Once a user has been authenticated, they are directed to an instance that offers a solution.So the sturcture looks like this
/var/www/html/
    index.php
    CI4auth/
    CI4soln1/
    CI4soln2/

So as I stated, whenever an instance of CI4 is active I now have my URLs as
    http://localhost/CI4auth/public/view
    http://localhost/CI4soln1/public/view
    http://localhost/CI4soln2/public/view

etc.

My wish is to hide the public directory so that I have
     http://localhost/CI4auth/view
    http://localhost/CI4soln1/view
    http://localhost/CI4soln2/view



(03-17-2020, 05:21 PM)owino Wrote: I am working on a project that will solve multiple problems but a user may potentially use more than one of these solutions.

So I have an instance of CI4 handling users (logins, passwords etc) with its own database.

I have another instance of CI4 implementing a solution to the first problem with its own database.

I will soon be using another instance CI4 to solve another problem that I have already identified.

But no user should use any of these solutions without going through the CI4 instance that authenticates users among other things basic

.
.
.

When I was using CI3, there was no problem. The trouble is that CI4 has introduced the 'public' directory which is now my headache.

Whenever an instance X of CI4 is the one active I now have my URL as http://localhost/InstanceXofCI4/public/view. The 'index.php' is out of the way but I am stuck with 'public' directory.

Is it possible to hide the 'public' directory without changing the default directory structure?

If you use shared hosting, or cant point the root directory. You can choose my 2nd option. If you have root access you just need to change the root directory

Sorry, I should have stated how my folder structure looks. My document root according to the apache2 server is /var/www/html. In this root directory is where I have copies of instances of CI4. So far I have two copies, the one that authenticates users and one that offers a solution to the first problem. Within the root also is an index.php file whose job is simply to direct visitors to the authenticating instance.Once a user has been authenticated, they are directed to an instance that offers a solution.So the sturcture looks like this
/var/www/html/
index.php
CI4auth/
CI4soln1/
CI4soln2/

So as I stated, whenever an instance of CI4 is active I now have my URLs as
http://localhost/CI4auth/public/view
http://localhost/CI4soln1/public/view
http://localhost/CI4soln2/public/view

etc.

My wish is to hide the public directory so that I have
http://localhost/CI4auth/view
http://localhost/CI4soln1/view
http://localhost/CI4soln2/view
Reply


Messages In This Thread
RE: Multiple instances of CI4 and removal of public/index.php/ from url - by owino - 03-20-2020, 04:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB