D
D
DmitryLife2022-03-18 00:56:50
htaccess
DmitryLife, 2022-03-18 00:56:50

How to implement a partial redirect to a directory?

I have the Laravel framework installed. .htaccess has a redirect all inside the public folder, to start the engine itself.
Content:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

BUT I need to place a new folder with an additional script in the same directory. Those. all requests like mysite.ru/newscript/* got to the script, and everything else, as it is, to the public.

Example:
mysite.ru/newscript -> in newscript/index.php
folder mysite.ru/newscript/db/db.php -> in newscript/db/db.php folder

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