Monday, July 21, 2003


Turn off directory contents listing.

Options -Indexes

Set error pages. The trailing slash is required for directories. The server doesn't like http:// but it will work.

ErrorDocument 400 /directory/
ErrorDocument 401 /directory/file.html
ErrorDocument 403
ErrorDocument 404 /
ErrorDocument 500 " custom text

Prevent hotlinking in this and in sub directories. Options All negates any higher level Options -Indexes, so if you want that you'll have to do it again after this block. Note that line 3 allows direct requests. Delete it to disallow direct requests.

Options All 
RewriteEngine on 
RewriteCond %{HTTP_REFERER} !^$ 
RewriteCond %{HTTP_REFERER} !^http://(www.)?*$ [NC] 
RewriteRule .(gif|jpg|png)$ - [F] 

Password protect this directory and sub directories.

require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /somewhere/.htpasswd
{ "loggedin": false, "owner": false, "avatar": "", "render": "nothing", "trackingID": "UA-36983794-1", "description": "", "page": { "blogIds": [ 85 ] }, "domain": "", "base": "\/michael", "url": "https:\/\/\/michael\/", "frameworkFiles": "https:\/\/\/michael\/_framework\/_files.4\/", "commonFiles": "https:\/\/\/michael\/_common\/_files.3\/", "mediaFiles": "https:\/\/\/michael\/media\/_files.3\/", "tmdbUrl": "http:\/\/\/", "tmdbPoster": "http:\/\/\/t\/p\/w342" }