Welcome Guest, Not a member yet? Register   Sign In
Create CI4 project in sub folder
#8

(06-04-2020, 10:23 PM)jean5769 Wrote:
(06-04-2020, 03:56 PM)meta Wrote: I'm not sure if this is something you can 'fix' with htaccess. Well, sure there will be any workaround about this topic but I'm not sure if that's a good practice as well.

I'm new to migrating from 3.x to 4.x, and I'm willing to do it very badly, but I also have old projects like yours that keep me from migrating.

E.g., I have the following structure

-- applications
----- administration
----- frontend
-- admin
----- assets
----- index.php (this is for the administration app)
-- assets
-- uploads
-- system
-- .htaccess
-- index.php (this is for the frontend app)

I mean, how can I re-structure this kind of projects? I get it that the new style is to have the core outside the whole project and manage every application as a whole new project, which is fine. But I want to keep this structure as I showed above where I can place all those indexes into their own subfolders within the public folder.

-- applications
----- administration
----- frontend
-- public
----- admin
-------- assets
-------- .htaccess
-------- index.php (admin)
----- assets
----- index.php (this is for the administration app)
-- system

After experimenting with CI4 I couldn't correctly call to the sub-applications into their own 'index wrapper'. After I edit the Paths.php and each index.php assigning them their correct path, all I get is new production error. I tried fixing my namespaces (which has nothing to do since the Autoload.php already have the App namespace wildcard on the PSR-4 array)

Any guess my dear community?

Thank you in advance.

Hi,

Thank you for your answer. I understand your problem but I think you need to create your own topic. You don't have the same problem.

You need to manage multi application projects. I guess you have already seen the page? https://codeigniter4.github.io/userguide..._apps.html

Can you try to use subdomain like admin.website.com?

Hello.

Actually, it is the same issue. What you need is just to make those folders, insert the index.php with its own .htaccess each and point to the right app that might be laying within the very same domain (or anywhere accesible within your server). Your approach is even more accesible given you want to have every dependency folder independent on its own folder 'wrapper' let's call it. 

I have seen the documentation and followed every step I could find about this multi app project, but didn't find anything. I just find similarities in the process with your request and didn't want to start a new topic on that, considering that we might be pursuing the same solution.
Reply


Messages In This Thread
Create CI4 project in sub folder - by jean5769 - 04-09-2020, 09:38 AM
RE: Create CI4 project in sub folder - by dodbda - 04-09-2020, 12:53 PM
RE: Create CI4 project in sub folder - by meta - 06-04-2020, 03:56 PM
RE: Create CI4 project in sub folder - by meta - 06-05-2020, 07:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB