N
N
nzt2002018-09-17 21:44:00
Apache HTTP Server
nzt200, 2018-09-17 21:44:00

How to configure htaccess for Front Controller (in a separate directory)?

Hello.
I am developing a site for educational purposes on a local computer, the installed server is nginx, everything works fine. Now there is a need to put it on hosting, running Apache. I can't set up htaccess correctly.
At the root of the site are the App, vendor, config, web folders.
All classes are in App. The web folder contains only the Front controller and static css/js/img files.
Accordingly, the task is to make the web folder the root of the site. That is, all requests go to project/web/index.php
An important clarification: in the templates, the path for css contains the path /css/style.css
I managed to redirect all requests to web/index.php, but all the styles flew off, because for the fact that the root folder is still considered the root of the site.
There is a suspicion that you need two htaccess files, in the root, and in the web folder
. I apologize for such a chaotic explanation, I will be of any help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question