Submit Your Article Forum Rules

Results 1 to 9 of 9

Thread: Hotlink settings "Mystery Effect" on my second computer

  1. #1
    Senior Member dgswilson's Avatar
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    284

    Hotlink settings "Mystery Effect" on my second computer

    Can't find this question being asked anywhere. Can't get answer from host, so ...

    Hotlink settings are - you can't get any images, video or audio unless you are on the site. Works fine, cut my bandwidth by half - but - Can't play my sites video or audio from my living room (2) computer.

    Same ip, same connection. Disable hotlink settings and it plays fine. Tried logging off internet with work computer - no good. Like the support guy from host said, "I have no idea".

    Have AT&T Uverse switch with one Cat5, one data, line in, two lines out to computers. Have Fedora, using Firefox version that came with OS. Computer (2) does show images.
    In search of the self determined path

  2. #2
    Senior Member
    Join Date
    Jul 2003
    Posts
    114
    Preventing hotlinking through .htaccess checks the referer if I'm not mistaken. So, somehow the living room computer is sending something different for the referer. When or where it works, do you use the www. in the address and do you also use that on the computer where it doesn't work? Just a guess. You could probably write a little PHP file to show the http referer you send from each computer.
    Code:
    <?php
    echo $_SERVER['HTTP_REFERER'];
    ?>
    Save as referer.php or something and upload it, then visit it from each location and see whether they are correct, or match what is in the .htaccess file.
    ??

  3. #3
    Senior Member dgswilson's Avatar
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    284

    settings

    "....htaccess checks the referrer..." - I don't think hotlink settings deny for who, just where.

    Settings say, if you're on the site you can watch and listen. If you're at Google video, BeeMP3 etc. then you can't watch or listen.

    "....do you use the www ...." - I've never set a preference, plays with or without "www".

    Thanks for thinking about it, the girl just turned the lights out - so I guess my day is over

    I'll do some more checking tomorrow.
    In search of the self determined path

  4. #4
    Senior Member
    Join Date
    Jul 2003
    Posts
    114
    http referer is where, not who. It's where the request is coming from as sent by the browser. I realized after my first post that going to referer.php directly means there wouldn't be any referer to show, so you'd have to visit it via a link. Here's a link. If it's working correctly, the referer should be this WPW page.
    If the computer, or the browser, in your living room is not sending the http referer correctly, it could trigger the hotlinking prevention. If so, it doesn't solve your problem, but should shed some light on it. Whether the browser sends the referer or not could be affected by a firewall, a browser plugin, something like that.

  5. #5
    Senior Member
    Join Date
    Jul 2003
    Posts
    114
    If it's the first site in your signature, I can't play any videos there, either. I also tried to open the flv file through vlc player and get a 403 forbidden error. My browser does send the http_referer.

  6. #6
    Senior Member dgswilson's Avatar
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    284
    followed link, returned

    hxxp://www.webproworld.com/webmaster-forum/threads/108994-Hotlink-settings-quot-Mystery-Effect-quot-on-my-second-computer?p=565358

    If I paste it ( hxxp://www.dlh1.com/temp/referer.php ) in the address bar and hit enter - blank page

    I bookmarked it, opened from bookmarks, blank page

    Not sure what blank page means (?) One thing to keep in mind in this equation is - I can see images. Images carry the same hotlink settings.
    In search of the self determined path

  7. #7
    Senior Member dgswilson's Avatar
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    284
    You were on the page, and video wouldn't play? Anything flash up on screen?

    "tried to open the flv file through vlc player and get a 403 forbidden error" - That I would expect

    Your ip starts with 96?
    In search of the self determined path

  8. #8
    Senior Member
    Join Date
    Jul 2003
    Posts
    114
    Yes, I was on the page and the video wouldn't play. I purposely chose a couple of the shorter videos. There were two brief messages in the pakplayer, but they go by so fast it's hard to read them. Yes, my ip starts with 96. I would try to get a screenshot, but I have to sign off now and go to work.

  9. #9
    Senior Member dgswilson's Avatar
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    284

    Thanks

    I'll put the code I've tried here and see if anyone can find trouble in them:


    #hotlink by referrer

    #1
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/.*$ [NC, OR]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?2domain.com/.*$ [NC]
    RewriteRule \.(gif|jpg|jpe?g||bmp|png|flv|mp3)$ - [F]

    #hotlink by referrer environment

    #2
    SetEnvIfNoCase Referer "domain\.com" local_ref=1
    SetEnvIfNoCase Referer "2domain\.com" local_ref=2
    SetEnvIfNoCase Referer "www\.domain\.com" local_ref=1
    SetEnvIfNoCase Referer "www\.2domain\.com" local_ref=2
    <FilesMatch "\.(gif|jpg|png|swf|flv|mp3)">
    Order Allow,Deny
    Allow from env=local_ref
    </FilesMatch>

    I had the second one in .htaccess when problem was found and Dean couldn't play file. The first one is from a txt file where I store things I've used or tested.

    Took both of these out and enabled protection in cPanel hotlink settings. Now have this in .htaccess:


    RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://domain.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.domain.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://3.domain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://3.domain.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.3.domain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.3.domain.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://2domain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://2domain.com$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.2domain.com/.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://www.2domain.com$ [NC]
    RewriteRule .*\.(jpg|jpeg|gif|png|bmp|mp3|flv)$ hxxp://www.domaincom/ [R,NC]

    Once I plugged in the last cPanel code I could load video on the page Dean was on, but not on html pages (cleared cache) ....
    In search of the self determined path

Posting Permissions

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