Help - Search - Members - Calendar
Full Version: Hot link revisted once more
Hostony Board > General Support > HowTo
Rastus
this is my .htaccess

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://gallery.texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://gallery.texas4x4.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://texas.texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://texas.texas4x4.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://texas4x4.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.gallery.texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.gallery.texas4x4.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.texas.texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.texas.texas4x4.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.texas4x4.org$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://www.texas4x4.org/gallery/albums/stuff/no_linking.jpg [R,NC]


Hot linking is not working...

who knows why not?

url of pic that should not be displayed
pic
JasonJones
Is texas4x4.org primary or an addon?
Rastus
primary
JasonJones
Ok, dumb question but this is in your .htaccess file located in ~/www/ (public_html) right? It should be working just fine the syntax is correct.
Rastus
yes
JasonJones
Try this. Edit your .htaccess, remove/comment out everything and just add this:
CODE
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://texas4x4.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.texas4x4.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.texas4x4.org$ [NC]
RewriteRule .*\.(JPG|GIF|jpg|jpeg|gif|bmp|eps|tif|tiff|png|psd|zip)$ http://lelombrik5.free.fr/Images/Drumkid.gif [R,NC]
JasonJones
Also, edit or make a new post over @ the k5board and link to this image:

http://pr0ntab.com/fodder/crawl-in.jpg

It should give the no linking image, if not, there is a biger problem smile.gif
Rastus
yours works.. mine don't

as in, I still see my image... and when I made the post with your link, your drummer kid is displayed
JasonJones
I see that. I also registered and posted as well.. hrm.. ok. something is borked then in the .htaccess... Out of curiosity, did you set it up with the Cpanel hotlink page? It works just fine, well at least on my end... make a copy of .htaccess and erase the original. Then use the cpanel hotlink option to make the new one and see if it works then. If so, we need to look at the rest of the .htaccess and see where the problem lies...
Rastus
ok... brb
Rastus
still no worky. I did it from the hotlink button, this time


looks just like I wrote it earlier dry.gif
JasonJones
Yeah, your earlier version looked just fine. Is there anything in the .htaccess file besides the rewriterule you just created?

Testing:


...

Rastus
just this

DirectoryIndex index.html intro.php portal.php index.php index.htm
JasonJones
As you can see above, I uploaded that same image to pr0ntab.com and linked it here, and it shoots the drumkid image, so its not the image, or the filename...

Hate to do it to ya, but open a trouble ticket...
Rastus
thanks for trying smile.gif
Rastus
well... they are working on it...

See the progress

Progress ?
Alec
You have one more .htaccess file in folder gallery and it overrides you main .htaccess.

It also contains Rewrite directives.


P.S. Jason, thank you for your help
Rastus
ok, I deleted that old file, I thought renaming a file broke the link to it???

now, take a look at my site

site
Rastus
Ok, I got it fixed. biggrin.gif

My problem was I did not have an .htaccess file in my albums folders in my gallery. I was using the default .htaccess file, that the cpanel will modify. Had to create a file and upload it. And that's all it was. smile.gif


also ran across a handy tool for creating .htaccess files

http://www.htmlbasix.com/disablehotlinking.shtml
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here