Click to See Complete Forum and Search --> : .htaccess not showing up on my new server


webdan
09-30-2002, 09:58 PM
I have sucessfully set up my first redhat server.
Everything works fine.
I am trying to add a .htacess file to stop people from hotlinking to my site and my stuff. Below is the .htacess file I uploaded to my server via ftp. It doesn't show up on in my ftp on my server side which is weird, but I can see the file when I telnet in and do a ls-al. Even so, the htacess file is not working. I put the exact same file on my other host (a virtual host that I pay for through a hosting company) and it works perfect, any ideas please? Is there something that I have to turn on in my server to make .htacccess show up and work?
(here is the .htaccess file, I put generic info in here just on the formum, on the file I uploaded to my server, I put the real domain and ip in).
AuthUserFile /dev/null

AuthGroupFile /dev/null

RewriteEngine On

RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com
RewriteCond %{HTTP_REFERER} !^http://mydomain.com
RewriteCond %{HTTP_REFERER} !^http://ipaddress


RewriteRule /* http://mydomain.com [R,L]

macian
10-01-2002, 03:05 PM
best way to see if apache is even reading your .htaccess file is just put some garbage in it and see if you get an error.

if you dont get an error then your problem is in the httpd.conf file. Probably there is an AllowOverride None for the directory that the .htaccess is in, comment this like out and this should work.

Sean D.