D
D
Dmitry2018-04-15 10:06:49
htaccess
Dmitry, 2018-04-15 10:06:49

How to send all requests to a specific folder?

The question seems to be simple, but I blunted something. It is
necessary to send absolutely all browser requests to the "public" folder, which is located at the root.
In the root htaccess I write
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L,QSA]
The public folder has its own htaccess that sends requests to public/php/bootstrap.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{ REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ php/bootstrap.php [L,QSA]
Throws an error:
Forbidden
You don't have permission to access /public/ on this server.

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