Answer the question
In order to leave comments, you need to log in
How to allow a script to access a protected folder?
Hello everyone. I post all my projects on sprinthost hosting, maybe someone knows.
I ran into a problem. There is such a function in the control panel, protect the folder.
When using this function, gaining access to the selected folder outside the control panel becomes possible only when entering the password and login specified during protection.
The thing is this: when writing the site, I put all the scripts in one folder and protected it so that the user could not read, see, copy the code, in general, so that the user would not have any access to the code.
This is where the fun begins. During testing, I noticed that the program that "calls" the script cannot access it and requires the user to provide data to obtain this very access.
Question: How to allow the program access to scripts that are in a protected folder?
Here is what is in .htaccess:
### begin Sprinthost-secure 03.05.2021 13:10
AuthUserFile /home/user/domains/MyDomain/public_html/scripts/.htpasswd
AuthName "Authentication"
AuthType Basic
Require valid-user
<Files .ht*>
deny from all
</Files>
### Sprinthost-secure end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question