Results 1 to 6 of 6
  1. #1
    Newbie
    Join Date
    January 18th, 2005
    Posts
    41
    I have an .htaccess file in place in the /image directory, but there is a problem with it.

    For some reason it does not follow the rule when someone is hotlinking to my website if they use the www. in front of the domain name. If the www. is omited the .htaccess file works correctly.

    For example: <IMG height=96 src="http://www.peachpatch.com/image/walkdot.gif" width=102><br><br><IMG height=96 src="http://peachpatch.com/image/walkdot.gif" width=102>

    Here is an example page hotlinking to the domain name using both www. and without the www., so you can see what I mean. You will see the image using www. and you will not see the image without the www.

    http://peachpatch.0catch.com/index.html

    This code is being used:

    <IMG height=96 src="http://www.peachpatch.com/image/walkdot.gif" width=102><br><br><IMG height=96 src="http://peachpatch.com/image/walkdot.gif" width=102>
    <BR><br> <img src="http://www.peachpatch.com/image/starburst.jpg" width="420" height="420" border="0"> <BR><br> <img src="http://peachpatch.com/image/starburst.jpg" width="420" height="420" border="0">

    Here is the .htaccess file I'm using. I know it looks duplicated, but with the server I'm using, if the domain name is not inserted both with and without the backslash, it is not recognised.

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://peachpatch.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://peachpatch.com.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.peachpatch.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.peachpatch.com.*$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|bmp|png)$ http://peachpatch.com/caughtpp.jpg [R,NC]

    I tried adding this line under the RewriteRule line to take care of the www hotlinking:
    RewriteRule .*\.(jpg|jpeg|gif|bmp|png)$ http://www.peachpatch.com/caughtpp.jpg [R,NC]

    But using both lines, blocks the images on my own domain.

    Does any one have any idea why the .htaccess file is not blocking hotlinked images using the www but it does if the www. is not included in the code?

    How can I correct this problem?


    Thanks,
    Peach

  2. #2
    http and a telephoto
    Join Date
    January 18th, 2005
    Location
    NYC
    Posts
    17,708
    I have 4 boxes with red x's showing and no images. Maybe you are seeing what is in your cache?
    Deborah Carney
    TeamLoxly.com BookGoodies.com ABCsPlus.com

  3. #3
    Newbie
    Join Date
    January 18th, 2005
    Posts
    41
    My browser setting is to refresh every visit. I have also manually cleared my catch and deleted all temp. files.

    Here is an actual example of the hotlink:
    the green heart image is mine and they coded it with http://www.peachpatch.com/image/walkdot.gif

    http://www.xanga.com/home.aspx?user=sp0rty0jae

    I can see the images on both urls:

    http://www.xanga.com/home.aspx?user=sp0rty0jae
    http://peachpatch.0catch.com

    Does anyone have any idea how to prevent this?

    Thanks
    Peach

  4. #4
    Newbie
    Join Date
    January 18th, 2005
    Posts
    41
    Pardon me for forgetting to tell you this. Please do not have your sound turned on when you view http://peachpatch.0catch.com

    The .htacess file in the /sound directory is working very well

    It isn't the sound they wish to hear but they do get to hear a sound

    Thanks,
    Peach

  5. #5
    http and a telephoto
    Join Date
    January 18th, 2005
    Location
    NYC
    Posts
    17,708
    TO OTHERS:

    DO NOT CLICK ON THE LINK ABOVE WITHOUT SPYWARE PROTECTION.

    Something tried to download and was supposedly stopped, I will go run all my spyware tools to make sure.

    Peach,

    Your images are NOT showing on that page, so your settings are correct and you are seeing the images from your cache.

    I am outta this thread, it is now getting dangerous and I am NOT testing or looking at any more pages you post!!!
    Deborah Carney
    TeamLoxly.com BookGoodies.com ABCsPlus.com

  6. #6
    Newbie
    Join Date
    January 18th, 2005
    Posts
    41
    On which link are you finding spyware? I don't have any spyware on my links.

    The http://peachpatch.0catch.com domain is because it is a free site full of banner ads, which I use for testing purposes only. I have no control over whatever 0catch.com pop ups are.

    I use Pest Patrol for spyware protection. I hate parasites and spyware and I do not use them.

    Thanks,
    Peach

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Help Mod rewrite
    By womanht in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: April 10th, 2007, 10:01 PM
  2. Rewrite
    By net2ride in forum Midnight Cafe'
    Replies: 0
    Last Post: March 4th, 2006, 03:50 PM
  3. URL ReWrite Question
    By dak142 in forum Midnight Cafe'
    Replies: 4
    Last Post: August 11th, 2004, 12:02 PM
  4. Mod Rewrite Question
    By swampy_webber in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: January 13th, 2004, 04:39 PM
  5. Anyone good with Mod Rewrite?
    By TJ in forum Programming / Datafeeds / Tools
    Replies: 7
    Last Post: November 22nd, 2003, 09:16 AM

Posting Permissions

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