...

View Full Version : .htaccess help please



kat7
03-17-2003, 02:41 AM
Great information on the tutorials.

I was interested in the "stop hot links" using .htaccess

someone wrote a ksh for me a few years ago but it now will not work on my new server (the writer disappeared).

It not only hid the actual image directory name but it would redirect the image being linked to ... to a "this image is stolen" image instead ... a really great little program.

I am searching for a replacement for that program

I used the code on the htaccess tutorial:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.yourdomain.com/nasty.gif [R,L]

It does stop the hot link but does not serve up the nasty.gif

I did change all of the yourdomain (s) to the correct address and the .gif is in the root directory also.

Any idea what my problem might be?

Also when I sent the .htaccess file to the server it does not show up on the server ... I am using wsftp ... since the file does not show up (tho it says it is there) on the server I can not chmod it to 644

Thanks,
Linda

pb&j
03-17-2003, 03:47 PM
Originally posted by kat7
Also when I sent the .htaccess file to the server it does not show up on the server ... I am using wsftp ... since the file does not show up (tho it says it is there) on the server I can not chmod it to 644
I think wsftp needs an option to make "invisible" files appear for you on the server side window. I can't recall the exact term or option, but have a look through them all and see if any fit that type of idea.

As for the rewrite to a baddy image, your coding seems right, just need to replace the URL with your own.

dragon
05-15-2003, 08:21 AM
-al is what you're looking to use with WS_FTP. If you do a search for "remote file mask" the Help section of the program you should be able to find the exact place where you're looking to put it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum