Is it possible to allow only the "home" domain name to access files in a given directory? In other words, I do not want other people, spiders, etc. to be able to access images and other files that should be used by the web pages on my domain only.
Thanks!
Tomas
Protect all files in a directory from direct access?
Moderator: General Moderators
-
magicrobotmonkey
- Forum Regular
- Posts: 888
- Joined: Sun Mar 21, 2004 1:09 pm
- Location: Cambridge, MA
-
tomfra
- Forum Contributor
- Posts: 126
- Joined: Wed Jun 23, 2004 12:56 pm
- Location: Prague, Czech Republic
Yes, I do know that this can be done via .htaccess and I found a way how to protect any file type I specify, but what about a specific file? I am sure it's mentioned somewhere at http://httpd.apache.org/docs/misc/rewriteguide.html but I couldn't find it there.
Tomas
Tomas
http://httpd.apache.org/docs-2.0/mod/mod_access.html is what you really should look for 
you probably have configured your webserver wrong... Because following works fine..
Code: Select all
<Directory "C:/private">
Order deny,allow
Deny from all
Allow from .home
</Directory>