htaccess - can block directory view, but files are still directly viewable

.htaccess, php

Solution

You can set restrictions like this:

Order Deny, Allow
Deny from all #everyone will not be allowed except the following line
Allow from 127.0.0.1 123.123.123.123 #allowed hosts separated by space

Problem

Possible Duplicate: Hotlinking my Cascading Style Sheets This is a bit of a follow up to this question .htaccess don't allow user to view my folder files that don't have index.php which worked perfectly for blocking directory level access, but it still doesn't block direct access if someone knew the url i.e. domain.com/css/ is forbidden, but domain.com/css/main.css shows the css file how would i block direct access to that file? it seems like such a standard thing but i can't find anything for it

Original source

Related problems