Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Backend/Frontend with the same app folder and different index.php
  • Hi,

    Is it possible to make two different sites with the same application folder but with own index files and controller folders?

    For example with such structure:

    image

    I want to use the same configs, models etc but the different controllers and routes. The site1 controllers/routes should not be available for site2, and the site2 controllers/routes for site1.

    May be some play with modules?

    Thanks
  • No, one "index.php" maps to one APPPATH.

    So while it is possible to map:
    http://mysite/app1/something => app1.php => ./app1
    http://mysite/app2/something => app2.php => ./app2
    (where app1 and app2 are copies of index.php with an altered APPPATH)

    It is not possible to share individual files in both apps (maybe other then some symlink magic).

    You can solve that with modules and packages, which can be shared without problems. The same is true btw for the core, you can have a server full of apps, all sharing the same core folder.
  • Two sites in 1 app. Yes, you can do with my FuelStart which is multi-site support.
    Here. https://github.com/OkveeNet/fuel-start

    It is based on FuelPHP MIT license and free.

    Its limitation is 1 site per domain. So you cannot use http://mysite/app1 and http://mysite/app2 but you can use http://sv1.mysite and http://sv2.mysite

    But! No, you cannot use it with different controllers. As @Harro said.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • Harro September 2014
  • vee September 2014