Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htaccess help please

    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: .htaccess help please

    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.
    Last edited by pb&j; 03-17-2003 at 04:50 PM.

  • #3
    New Coder dragon's Avatar
    Join Date
    May 2003
    Location
    Florida
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts
    -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.
    Last edited by dragon; 05-15-2003 at 02:43 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •