Can anyone tell me the PHP equivalent of web.config settings (in .NET) that allows you to limit access to files in a specific folder? For example, in a .NET application, you can limit access to files and folders using deny/allow settings in the location tags in the web.config.
This setting is individualized for each application, allowing one to set permissions for each application, even in a shared hosting environment. All the examples I’ve found online about setting such permissions in PHP requires one to have access to the web server before one can set the .htaccess files, which isn’t really possible in a shared hosting environment.
If the settings will equally work in an IIS shared hosting environment, that would even be very better.
Thank you.
N.B: In case it’s needed, I need users of the application to have access to certain folders/files based on their roles in the application. And I have an IIS shared hosting environment.
It doesn’t; you have to create that in the logic of your application. You can also use .htaccess or set it up via the server.