Jump to content

protecting a folder..?


acidglitter

Recommended Posts

If you are including stylesheets into your php script then theres no point in protecting the folder that holds the stylesheet as the user will be able view the css when they go to View > Source

 

To stop people from going a folder and viewing the folder index just add a blank index.html file into the folder, The server will serve index.html file by default. Or turn Indexes of for that folder within the .htaccess file:

Options -Indexes

The latter may not be possible on some host.

Link to comment
https://forums.phpfreaks.com/topic/97494-protecting-a-folder/#findComment-498838
Share on other sites

Well as the browser requests for that file, then that is the same as typing yoursite.com/folder/style.css within the address bar. There is no simple solution for protecting the css file. The css file and html file all get downloaded to the browsers cache and is parsed to produce what the user displays sees.

Link to comment
https://forums.phpfreaks.com/topic/97494-protecting-a-folder/#findComment-498845
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.