GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   HTAccess Question (https://gfy.com/showthread.php?t=1116172)

JimmyStephans 07-22-2013 04:13 PM

HTAccess Question
 
I'm trying to see if there is a way to do this with HTACCESS.

I have a file in http://domainone.com/images/

I want to link into an HTML page in the members area of http://domaintwo.com/members/

Thats easy... but my question is - can I do it, but also have an htaccess file in http://domainone.com/images/ that will prevent that same file from being linked to any other domain or accessed directly (type in).

?

Thanks in advance

Jimmy

Barry-xlovecam 07-26-2013 06:20 AM

Don't know off hand but this may help you : http://www.askapache.com/?s=htaccess

HomerSimpson 07-28-2013 04:05 PM

do you own both domain one and two?

http://www.awmzone.com/services - contact me with more details at celebempire{at}gmail/dot/com

JimmyStephans 07-28-2013 05:16 PM

Yes, but they are not on same server.

dunhill 07-29-2013 01:07 AM

Code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain1.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain2.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

Use this on your both domains to allow hotlinking from each other.

JimmyStephans 07-29-2013 08:05 AM

Thanks, I will try that today.

alcstrategy 07-29-2013 01:23 PM

or you can just completely hide the source of the image or whatever the content is instead of relying on referrer and do in a script like

<?php
header("content-type: image/jpeg");
echo file_get_contents("http://whatever.com/whatever.jpg");
?>

or just do remote reading like that. Header is only necessary based on the datatype
naturally if its same server different domain you can just do local path but i dont think that is the case with you

in your case I don't think referrer will make a difference


All times are GMT -7. The time now is 01:39 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc