Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-25-2003, 11:09 PM   #1
save11
Confirmed User
 
Join Date: Nov 2002
Location: rain city
Posts: 222
htaccess question

htaccess question:

Is this the proper format for blocking hotlinking by domain?
sogclub being the domain that is hotlinking

xxx being my (i wish) hehe domain



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

Also, can you insert ip in place of domain name with this format?
Thanks

ex:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?65.125.235.178.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://xxx.com/ [R,NC]
__________________
345682839
save11 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2003, 11:15 PM   #2
directfiesta
Too lazy to set a custom title
 
directfiesta's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Punta Cana, DR
Posts: 30,033
why not use the " deny" function in the httpd.conf file , since it is only for one specific domain.
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT !

But I can't figure out how he can breathe or type , at the same time ....
directfiesta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2003, 11:35 PM   #3
save11
Confirmed User
 
Join Date: Nov 2002
Location: rain city
Posts: 222
Actually i'm getting hotlinked by several but they only show up in the ref log by ip
__________________
345682839
save11 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 12:18 AM   #4
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
Quote:
Originally posted by save11
htaccess question:

Is this the proper format for blocking hotlinking by domain?
sogclub being the domain that is hotlinking

xxx being my (i wish) hehe domain



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

Also, can you insert ip in place of domain name with this format?
Thanks

ex:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?65.125.235.178.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://xxx.com/ [R,NC]
There's no difference between "(/)?.*" and simply ".*", they both accept the same strings. The problem is, neither of those two regexes reject anything, it's a useless bit in rewrite code that someone wrote early on and has been repeatedly copied. Numerical IP addreesses will have neither the "www." nor the ".com". So, I'd write this as:

<B>RewriteCond %{HTTP_REFERER} !^http://65.125.235.178[NC, OR]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?sogclub.com[NC]
RewriteRule \.(gif|jpg|jpeg|bmp)$ http://xxx.com/ [R,NC]</B>
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 12:26 AM   #5
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
Oh, and the target address in the rewriterule need not and really shouldn't contain "http://" and [R], unless you are redirecting to a different server. So, if you're just sending them to the top of your site, write that line as:
<B>RewriteRule \.(gif|jpg|jpeg|bmp)$ / [NC]</B>
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 12:57 AM   #6
save11
Confirmed User
 
Join Date: Nov 2002
Location: rain city
Posts: 222
Quote:
Originally posted by fiveyes
Oh, and the target address in the rewriterule need not and really shouldn't contain "http://" and [R], unless you are redirecting to a different server. So, if you're just sending them to the top of your site, write that line as:
<B>RewriteRule \.(gif|jpg|jpeg|bmp)$ / [NC]</B>


Ok.. Thanks.. I'll try it out
__________________
345682839
save11 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 01:04 AM   #7
Reak
So Fucking Banned
 
Join Date: Mar 2003
Location: 420Calendar.com
Posts: 17,920
Quote:
Originally posted by save11
htaccess question:

Is this the proper format for blocking hotlinking by domain?
sogclub being the domain that is hotlinking

xxx being my (i wish) hehe domain



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

Also, can you insert ip in place of domain name with this format?
Thanks

ex:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?65.125.235.178.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://xxx.com/ [R,NC]
dont know but i know you need to change you sig..
Reak is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 01:17 AM   #8
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
Oops, glad you bumped this, I overlooked that you're going about this back-assedwards! Me bad!

THIS is what you want (No"<B>!</B>'s"):

<B>RewriteCond %{HTTP_REFERER} ^http://65.125.235.178[NC, OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?sogclub.com[NC]
RewriteRule \.(gif|jpg|jpeg|bmp)$ / [NC]</B>

Sorry I didn't catch that first time around....
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 01:19 PM   #9
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
(bumping to make sure <B>save11</B> notices that last change. Otherwise, the only people able to view his images will be the hotlinkers!)
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 01:19 PM   #10
lil2rich4u2
ICQ: 175171926
 
Join Date: Oct 2002
Location: New York, NY
Posts: 11,046
__________________
HEY!!

Unbeatable hosting! Customer service is top notch!

--> ISPrime <-- Do a search on any board, their reputation is rock solid .. for years!!
lil2rich4u2 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 01:44 PM   #11
BlackCrayon
Too lazy to set a custom title
 
BlackCrayon's Avatar
 
Join Date: Jun 2003
Location: Ottawa
Posts: 19,634
i got a little htaccess question of my own.

what do i need to add to my htaccess file for a HTTP 301 moved page?
BlackCrayon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 02:00 PM   #12
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
Quote:
Originally posted by BlackCrayon
i got a little htaccess question of my own.

what do i need to add to my htaccess file for a HTTP 301 moved page?
Use a "Redirect permanent" for that. As in

<B>Redirect permanent /old-missing-page-1.html http://www.your-url.com/new-replacement-page-1.html
Redirect permanent /old-missing-page-2.html http://www.your-url.com/new-replacement-page-2.html </B>
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 02:48 PM   #13
BlackCrayon
Too lazy to set a custom title
 
BlackCrayon's Avatar
 
Join Date: Jun 2003
Location: Ottawa
Posts: 19,634
Quote:
Originally posted by fiveyes

Use a "Redirect permanent" for that. As in

<B>Redirect permanent /old-missing-page-1.html http://www.your-url.com/new-replacement-page-1.html
Redirect permanent /old-missing-page-2.html http://www.your-url.com/new-replacement-page-2.html </B>
much thanks man!
BlackCrayon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 03:21 PM   #14
LBBV
Confirmed User
 
LBBV's Avatar
 
Join Date: Aug 2002
Location: Atlanta
Posts: 936
Or, to prevent ANYONE from linking to your images...


RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://.*YOURDOMAIN/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*YOURDOMAIN:80/.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://SOMEURL


Be sure to replace YOURDOMAIN with your actual domain name, and replace SOMEURL with the URL that you want the surfer to go to should they actually click on the red X on the hot linkers site!
__________________
National Net Hosting. Handled.
See our new line of inexpensive Dedicated Servers | Cabinets starting at $795 | CDN
[email protected] | 888-4-NATNET | www.nationalnet.com
LBBV is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-26-2003, 04:16 PM   #15
fiveyes
Confirmed User
 
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
Quote:
Originally posted by LBBV
Or, to prevent ANYONE from linking to your images...


RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://.*YOURDOMAIN/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://.*YOURDOMAIN:80/.*$ [NC]
RewriteRule .*[Jj][Pp][Gg]$|.*[Gg][Ii][Ff]$ http://SOMEURL


Be sure to replace YOURDOMAIN with your actual domain name, and replace SOMEURL with the URL that you want the surfer to go to should they actually click on the red X on the hot linkers site!
Won't block "http://MYDOMAIN/YOURDOMAIN/hotlink-page.html" (you can use "." within a directory name on *nix).
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>

<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
fiveyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.