Answer the question
In order to leave comments, you need to log in
How to redirect to a folder in htaccess?
I need to add a redirect, if the user visits the link
mysite/admin-control/ , then requests are redirected to the MyFiles folder "as is" with subfolders and all files. That is, if the user follows the link mysite/admin-control/pictures/my.jpg , then what would the subfolders and files be visible. How to do this?
Here is my code redirects everything to one folder, that is, if I enter mysite.com/admin-control/pictures/my.jpg - I get to mysite.com/admin-control/index.php so with any link
RewriteCond %{REQUEST_URI} ^/admin-control/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ admin/src/ [QSA,L]
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_URI} ^admin-control/.* [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.* admin/src/ [QSA,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question