Multiple Framworks within a separate folder domain

Asked

Viewed 30 times

0

I have a framework, where I want to divide it into several frameworks (MVC) per folder at the root of the domain. At the root of the domain I have no file, there are folders where I have file at the root of each folder one .htaccess thus:

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1

I would like my www.meudominio.com.br to have several folders, for example:

www.meudominio.com.br/pasta1
www.meudominio.com.br/pasta2
www.meudominio.com.br/pasta3

And in each folder (e.g., pasture 1, pasture 2, pasture3) had a file .htaccess to load a framework separately with other file structures with the file in boot set index.php and other folder structure (framework)

  • app
    -- controllers
    -- models
    -- views
  • system
    -- helpers
  • web

.htaccess
index php.

  • 1

    Okay, but what’s the problem? Create folders with the .htaccess inside didn’t work?

  • I created it separately, but, it gives error of redirecting the places, for example, add the path of pasture1 for example. I enter www.meudominio.com.br/pasta1/admin/login (where admin is the controller and login the action) after that all that is done is disappeared from the absolute path the root path "pasta1".

  • 1

    How so disappeared? Have you [Edit] the question and add the contents of these files .htaccess? There is a .htaccess at the root of the project?

  • I use a www.dominio.com.br/controller/action, where www.dominio.com.br is the absolute base path always, like making the absolute base path a folder level for example, I thought it could be set somewhere just once, otherwise until image paths have to set such folder.

  • 1

    But if you want multiple frameworks, the base path should not be dominio.com/pasta1? If not, how your application will know which framework it should load?

  • True, but that’s what I don’t know how to do and need this help. Where to set the base path of the friendly URL’s?

  • 1

    It’s a little hard to understand. If you access dominio.com/pasta1/controller/action, will execute the .htaccess of the directory pasta1 and load the page pasta1/index.php?url=controler/action, right? The action accessed is displayed? What exactly happens when accessed this URL?

Show 3 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.