Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
August 25, 2008 - Time to Vote for the August 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 30, 2008, 06:17:02 AM


Login with username, password and session length


Pages: 1 [2] 3   Go Down
  Print  
Author Topic: How To: Correct the issue with hotlink protection  (Read 5447 times)
leighsww
* The Tough Love Cuddly One *
Berserker Poster
*****
Offline Offline

Posts: 13870


WWW
« Reply #15 on: January 22, 2004, 06:02:12 PM »

I found that out, too, EJ.  So now, I don't use the Hotlinks Protection via cPanel to update, I go straight into the .htaccess file and add things there.
Logged
Hush
Über Jedi
*****
Offline Offline

Posts: 2760



« Reply #16 on: January 22, 2004, 06:06:22 PM »

Hello,

Sorry took a while to come back to this.  There are glitches every now and again, and if you are comforable just starting straight in .htaccess, this will always be better.  The lines of code can just be entered.

There is also a really handy tool available for free use at:HTML Basix please excuse the popup ads  Thumbs Up
Logged


<-Link Removed By Hush - Never To Reinstated->
EJ
Intergalactic Superstar
*****
Offline Offline

Posts: 192



« Reply #17 on: January 23, 2004, 11:03:07 AM »

Quote from: Hush
Hello,

Sorry took a while to come back to this.  There are glitches every now and again, and if you are comforable just starting straight in .htaccess, this will always be better.  The lines of code can just be entered.

There is also a really handy tool available for free use at:HTML Basix please excuse the popup ads  Thumbs Up


No problem Hush,

Do I need to disable hotlink protection, first? And I'll check out that link, Thanks


edit:everything seems to be working, so I'll leave it be
Logged
datahomi
Trekkie
**
Offline Offline

Posts: 18



WWW
« Reply #18 on: February 01, 2004, 05:45:10 PM »

tks for the tip!

im tryin to do it now!
Logged

dfaonxa
Intergalactic Cowboy
*****
Offline Offline

Posts: 64


« Reply #19 on: April 08, 2004, 08:01:44 AM »

Okay, I'm dredging up an old subject here, but... I've been having this precise problem (that when I think about it occurred when I altered my .htaccess file to deny hotlinking), but when I made the changes suggested (I simply copied/pasted the text and changed it to my domain name), my page returns a 500 error.  Any suggestions?
Logged
leighsww
* The Tough Love Cuddly One *
Berserker Poster
*****
Offline Offline

Posts: 13870


WWW
« Reply #20 on: April 08, 2004, 11:47:40 AM »

Did you edit the htaccess file in cPanel, or in Notepad the uploaded via FTP client?  If you did the latter, did you upload in ASCII mode?  If you didn't, then it probably uploaded in binary and that may be the problem.

Try again.
Logged
dfaonxa
Intergalactic Cowboy
*****
Offline Offline

Posts: 64


« Reply #21 on: April 08, 2004, 02:09:20 PM »

I did it over FTP, so I tried uploading in ASCII and it still gives me the same problem.  I haven't been able to get into cPanel lately (404 errors) so I haven't been able to try that yet.
Logged
leighsww
* The Tough Love Cuddly One *
Berserker Poster
*****
Offline Offline

Posts: 13870


WWW
« Reply #22 on: April 08, 2004, 02:17:21 PM »

Post what your htaccess file looks like.
Logged
dfaonxa
Intergalactic Cowboy
*****
Offline Offline

Posts: 64


« Reply #23 on: April 08, 2004, 06:01:47 PM »

AddHandler server-parsed .htm

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http:// ( www \ . )? passionbreedsfollowers.com ( / )? .*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]


(the first line to enable hidden SSI)
Logged
leighsww
* The Tough Love Cuddly One *
Berserker Poster
*****
Offline Offline

Posts: 13870


WWW
« Reply #24 on: April 08, 2004, 06:23:38 PM »

You have spaces where there shouldn't be.  This line should look like this:

Code:

RewriteCond %{HTTP_REFERER} !^http://(www\.)?passionbreedsfollowers.com(/)?.*$ [NC]


Remove the space in front of "passion" and after ".com" (you can just copy the above line and paste over the original line in your .htaccess), then it should work.

I don't know anything about the SSI line, so if the above still doesn't work, then it could be that first SSI line you have that's causing the problem.

Again, I don't know much about the SSI line, but if it's an Apache Handler, aren't you supposed to add it in the Apache Handler section of cPanel?

Someone may be able to verify this, as I don't know much about Apache Handlers.
Logged
dfaonxa
Intergalactic Cowboy
*****
Offline Offline

Posts: 64


« Reply #25 on: April 08, 2004, 06:37:58 PM »

AHA, it finally works!  Thanks so much for your help!   Applause
Logged
Visitor
Intergalactic Superstar
*****
Offline Offline

Posts: 185


« Reply #26 on: April 17, 2004, 03:16:52 PM »

Just tried this, and the original post inserts a space with the colour tag

Quote from: leighsww
You have spaces inserted where there shouldn't be.  It should look like:

Code:
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain1.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain2.com(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?sub.domain1.com(/)?.*$ [NC]
RewriteRule .*\.(gif|bmp|jpg|png|zip|rar|exe)$ - [F,NC]


You probably copied and pasted Hush's code, but he had put in the color tags to make some parts RED which inserts a space.


Thanks for the help
Logged
leighsww
* The Tough Love Cuddly One *
Berserker Poster
*****
Offline Offline

Posts: 13870


WWW
« Reply #27 on: April 17, 2004, 03:44:34 PM »

Good that you posted that in this thread, Visitor, because this will be a problem for a lot of others (as it was for you and dfaonxa), when they copy and paste the code with the RED tags in it.

Hopefully, people will read through this entire thread, so that they remove the spaces.

Hush - maybe you should revise your original post to have a "Copy and paste this version" (for example) so that they don't copy the one with the RED tags. The one with the RED tags is still good to show where the changes occur, but the "copy & paste" version will be what they can actually use for the htaccess file.
Logged
Visitor
Intergalactic Superstar
*****
Offline Offline

Posts: 185


« Reply #28 on: April 27, 2004, 02:14:04 PM »

In the end I found by just adding...
RewriteCond %{HTTP_REFERER} !^$

fixed the problem anyway Smile
Logged
satirista
Spacescooter Operator
*****
Offline Offline

Posts: 31


WWW
« Reply #29 on: May 23, 2004, 07:10:23 PM »

Hi!

Is this still an issue and a valid fix?

If so, I have a question...

In my .htaccess file, my site name shows up in various permutations, including:

!^http://elizabethhanes.com/.*$
!^http://elizabethhanes.com$
!^http://www.elizabethhanes.com$
!^http://www.elizabethhanes.com/.*$

Do I need to modify the ones without the "www"? If so, how?

Do I need to modify the ones without the slash at the end? If so, how?

Thank you very much for this useful feature and for your wonderful explanation of how to make it work properly!

Elizabeth
Logged

Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM