Quote:
Originally Posted by david05
thank you very much. It's very useful.
If I have two websites (two domains), and I want to post the link to the second one. How could I do it?
Thank you
|
You should add these extra two lines for each domain you want to allow:
Quote:
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com$ [NC]
|
Example:
Quote:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourotherdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yourotherdomain.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|swf)$ http://www.yourdomain.com/forum/ [R,NC]
|
This image is located in a hotlink protected directory:
------- > It must be broken here. (Hotlink protected with forum home redirection)
This line allows it to be viewed by an empty referrer:
Quote:
RewriteCond %{HTTP_REFERER} !^$
|
Copy the url below, open a new browser window and paste it to address bar:
http://www.msxlabs.org/images/acting...sxlabs.com.gif
Once it's cached by your browser, you can view the image above in this post, too.
I used to redirect hotlink protected image files to a small gif file which was located in a non-hotlink protected directory:
Non-image files are always being redirected to my forum homepage.