View Full Version : Not sure whether this goes in HTML... The .htaccess file


alana_kai
07-15-2004, 07:14 PM
Sorry, I don't know what the .htaccess actually is. So I have this website and I wanted to prevent direct linking to it. I put the lines that Lissa suggested into the .htaccess file that came with my domain name, but for some reason it's not working. This is what it says in my .htaccess file:


# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName teyha-tala.co.uk
AuthUserFile /usr/local/psa/home/vhosts/teyha-tala.co.uk/httpdocs/_vti_pvt/service.pwd
AuthGroupFile /usr/local/psa/home/vhosts/teyha-tala.co.uk/httpdocs/_vti_pvt/service.grp

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?teyha-tala.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?teyha-tala.co.uk.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.teyha-tala.co.uk/dlink.gif [R,L]

I'm not sure what all that other stuff is before the code to ban direct linking, that was already there before I messed around with anything, does that have anything to do with it? I need some help here, please!