Log in

View Full Version : .htaccess Configuration help pls



immi007
06-30-2007, 05:14 PM
Hi,

There is a folder on my website that I wish to protect as it is protected on my website folder below:

https://ws21.ipowerweb.com/lajollap/cgi-bin/


It gives you "you are unauthorised to view this page" error. Could any of you kindly guide me as to how I can achieve this. :p

Thanks

immi007
06-30-2007, 05:33 PM
Ok so I've made this .htaccess file from what I learned from this website.

I have programed it to show a 403 Error upon accessing any of the directories on my website, and I'll be placing this on my root directory
i.e mydomain.com/.htaccess so that it protects all other directories on the website.

I've also programmed it for not allowing any hot linking of any of my gif|jpg|js|css content from my site.

take a look:

---------------------------------------------------------------

ErrorDocument 403 /errors/forbid.html

<Files .htaccess>
order allow,deny
deny from all
</Files>

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|js|css)$ - [F]

----------------------------------------------------------------

Is there anyother code that I need to put on this file before uploading it to take affect.

thanks

intinternetmarketing
07-01-2007, 03:13 AM
If you can protect from web admin is better more than .htaccess.

Twey
07-01-2007, 09:37 AM
intinternetmarketing, your grammar is unintelligible, to me at least.

immi007, no, that should work, but it would have been much easier just to deny read permission to world:
$ chmod w-r cgi-bin