0
I have the following directory structure in localhost:
-config
-hsapp
|--Controllers
|--Models
|--Views
-public
|--Assets
|--Index.php
-vendor
composer.json
You notice it’s an MVC structure. I created a virtualhost right to the folder public, locally, and works perfectly.
I now need to upload to a folder on a web server, (domain.com.br/folder) but I don’t know how to configure why, when entering the folder, access the folder public so that it is the root folder, because the system works with routes.
Someone can give a light to a beginner?
Thank you very much.
the server is Cpanel?
– Danilo
Nao. I managed with the following rewrite: Rewriteengine On Rewritebase / Rewriterule (?!/public/)(.*)$ /public/$1 [L] but now it does not find the view.
– Danntas
It has nothing to do with MVC. Besides, it’s not clear enough about what needs to be done. Although it is obvious that the focus of the problem is to create a URL rewriting or something similar. You yourself commented that it solved but causes another problem with the views that I believe is related to CSS and JS loading (assumption). That is, unfeasible to provide a solution and has become too broad.
– Daniel Omine