Answer the question
In order to leave comments, you need to log in
How to deny access to a directory other than a specific one?
The proxy folder contains a browse.php file and a few other files.
It is necessary that the user can go to site.ru/proxy/browse.php.
BUT deny access to other directories, for example:
site.ru/proxy
site.ru/proxy/admin
site.ru/proxy/plugins/live.com.php
etc.
Answer the question
In order to leave comments, you need to log in
Here is the solution to
not use the deny from prohibition, but only the redirection of
all folders will become forbidden, so that for example / css folders should be left in the .htaccess folder
and set RewriteEngine off in it - the entire folder is available
RewriteRule ^(.*)$ index.php [L ] // redirects all requests to the index
RewriteRule ^([^.]+)$ /proxy/browse.php [L] // disable specific file redirection (i.e. allow access as a separate file)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question