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 Mark Forums Read
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 08-17-2005, 05:33 PM   #1
RedShoe
赤い靴 call me 202-456-1111
 
RedShoe's Avatar
 
Industry Role:
Join Date: Feb 2001
Location: The Valley
Posts: 14,831
Does anyone know the htaccess code that...

I need the htaccess code (if there is one) that doesn't allow .jpg or .gif images to be displayed on their own.
I only want them to be displayed on an html page.
__________________

SPECIALTY COSTUMES • PROPS • FX
Superheroes • Monsters • Robots
PM for details


For any manufacturing needs. Adult or otherwise.

aka BonsHigh on Insta
Bonsai weed plants


RedShoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 05:42 PM   #2
mrkris
Confirmed User
 
Join Date: May 2005
Posts: 2,737
Make sure you have mod rewrite.

Rewriteengine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ "NC"
RewriteRule .*\.(gif|GIF|jpg|JPG)$ - "F"
__________________

PHP-MySQL-Rails | ICQ: 342500546
mrkris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 05:47 PM   #3
RedShoe
赤い靴 call me 202-456-1111
 
RedShoe's Avatar
 
Industry Role:
Join Date: Feb 2001
Location: The Valley
Posts: 14,831
But isn't that just for anti hotlinking? I used that code and I still can see the image. What I want is the code that does not show the image unless it's on an HTML page.

If that's even possible.
__________________

SPECIALTY COSTUMES • PROPS • FX
Superheroes • Monsters • Robots
PM for details


For any manufacturing needs. Adult or otherwise.

aka BonsHigh on Insta
Bonsai weed plants


RedShoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 05:51 PM   #4
mrkris
Confirmed User
 
Join Date: May 2005
Posts: 2,737
an HTML page is just a bunch of scripting that tells the browser what to display. When your browser sees an image, it grabs the image. In order to do what you want, from what I know, is to have a script READ the image from a non-web accessible directory and spit the contents to the browser.
__________________

PHP-MySQL-Rails | ICQ: 342500546
mrkris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 05:54 PM   #5
RedShoe
赤い靴 call me 202-456-1111
 
RedShoe's Avatar
 
Industry Role:
Join Date: Feb 2001
Location: The Valley
Posts: 14,831
AAhhhh.. that makes sense. Cool man, thanks.
A non-web accessible browser,... I didn't even think of doing it that way. Thanks.



edit...
Ok, so how do I call into a non-web accessible directory?
__________________

SPECIALTY COSTUMES • PROPS • FX
Superheroes • Monsters • Robots
PM for details


For any manufacturing needs. Adult or otherwise.

aka BonsHigh on Insta
Bonsai weed plants



Last edited by RedShoe; 08-17-2005 at 05:55 PM..
RedShoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 05:58 PM   #6
mrkris
Confirmed User
 
Join Date: May 2005
Posts: 2,737
depends on languages, etc. I do lots of php so I use fopen() or something similiar and pass it the path to the image i want to read. I also do this to create images with custom text based on an image template. perhaps someone else out there knows a better method.
__________________

PHP-MySQL-Rails | ICQ: 342500546
mrkris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 06:06 PM   #7
Superterrorizer
Confirmed User
 
Join Date: Sep 2003
Posts: 509
Quote:
Originally Posted by mrkris
Make sure you have mod rewrite.

Rewriteengine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://domain.com/.*$ "NC"
RewriteRule .*\.(gif|GIF|jpg|JPG)$ - "F"

Or just use that without the
RewriteCond %{HTTP_REFERER} !^$

which allows direct linking. The quotes around NC and F should be square braces though.

No need to dick around with anything else or any kind of scripting.
Superterrorizer is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 06:09 PM   #8
jimmyf
OU812
 
Join Date: Feb 2001
Location: California
Posts: 12,651
Quote:
Originally Posted by RedShoe
But isn't that just for anti hotlinking? I used that code and I still can see the image. What I want is the code that does not show the image unless it's on an HTML page.

If that's even possible.
the code I've got does what you want, all of my pics are in htm's... so is they type in (example) free1.jpg they go to 404
__________________
Epic CashEpic Cash works for me
Solar Cash Paysite Plugin
Gallery of the day freesites,POTD,Gallery generator with free hosting
jimmyf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 06:32 PM   #9
mikeyddddd
Viva la vulva!
 
mikeyddddd's Avatar
 
Join Date: Mar 2003
Location: you can't please everyone, so you got to please yourself
Posts: 16,557
Quote:
Originally Posted by RedShoe
I used that code and I still can see the image.
Clear cache and then try typing in the pic's URL with the code supplied in place.
mikeyddddd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 06:40 PM   #10
jimmyf
OU812
 
Join Date: Feb 2001
Location: California
Posts: 12,651
AuthUserFile /dev/null
AuthGroupFile /dev/null
AddHandler server-parsed .html
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.YOUR-URL.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://YOUR-URL.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.YOUR-URL.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://YOUR-URL.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://XXX.XXX.XXX.XXX/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://XXX.XXX.XXX.XXX:80/.*$ [NC]
RewriteRule .*\.jpg$ http://www.YOUR-URL.com [R,L]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.YOUR-URL.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://YOUR-URL.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.YOUR-URL.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://YOUR-URL.com:80/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://XXX.XXX.XXX.XXX/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://XXX.XXX.XXX.XXX:80/.*$ [NC]
RewriteRule .*\.gif$ http://www.YOUR-URL.com [R,L]
ErrorDocument 400 http://www.YOUR-URL.com/404/404.htm
ErrorDocument 401 http://www.YOUR-URL.com/404/404.htm
ErrorDocument 403 http://www.YOUR-URL.com/404/404.htm
ErrorDocument 404 http://www.YOUR-URL.com/404/404.htm
ErrorDocument 500 http://www.YOUR-URL.com/404/404.htm


REPLACE XXX.XXX.XXX.XXX 's WITH YOUR ip
hit enter 1 or 2 times after the last line

IMPORTANT transer it in ASCII
__________________
Epic CashEpic Cash works for me
Solar Cash Paysite Plugin
Gallery of the day freesites,POTD,Gallery generator with free hosting
jimmyf is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-17-2005, 06:43 PM   #11
Doc911
Confirmed User
 
Join Date: Feb 2004
Location: If i was up your ass you'd know
Posts: 3,695
yep you didn't clear your cache .
__________________


For PHP/MySQL scripts ICQ 161480555 or email [email protected]
Doc911 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
Thread Tools



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.