vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Disallow remote linking to attachment.php (https://vborg.vbsupport.ru/showthread.php?t=80861)

ImportPassion 05-02-2005 01:30 AM

Disallow remote linking to attachment.php
 
I did a search and didn't come up with anything. I know this existed for vb2, but I don't think there is one for vb3, if there is, please post a link. BUt if there isn't, wondering if someone could take it on?

THanks,
D

Reeve of shinra 05-02-2005 01:44 AM

Theres a way to do this with an htaccess file in your forums directory but im not sure of the details off hand.

mholtum 05-02-2005 02:35 AM

Quote:

Originally Posted by 7thgenCivic.Com
I did a search and didn't come up with anything. I know this existed for vb2, but I don't think there is one for vb3, if there is, please post a link. BUt if there isn't, wondering if someone could take it on?

THanks,
D

Do you have cpanel for control of your site? If so you can use "Hot Link Protection" and have any image you like display when someone links to your pics.. With a little imagination, this can be quite funny...

anarchystar 05-02-2005 02:50 AM

if you have .htaccess file control you can put the following lines in it:

Code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(forums\.)?yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google\. [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?search\?q=cache [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo\. [NC]
RewriteRule \.(gif|jpg)$ - [F]

This will allow only the domains listed to link to images on your site, notice that I have the line:
Code:

RewriteCond %{HTTP_REFERER} !^http://(forums\.)?yourdomain.com/.*$ [NC]
that is for the subdomain forums.yourdomain.com ... any subdomain you want to allow access to imgages must be listed as such also

I also allow search engine domains to link to my images fro cacheing of pages, but you don't have to. If you don't want search engines to cache pages, just remove those lines

and finally, the line:
Code:

RewriteRule \.(gif|jpg)$ - [F]
tells the script what kind of images to apply the rules to. you can also add .bmp's or .png's by adding a pipe and the new file extenstion like this:
Code:

RewriteRule \.(gif|jpg|png|bmp)$ - [F]

Protoman 05-02-2005 01:05 PM

I have the same sort of problem with remote linking of image.php and attachment.php but I can't use htaccess

Is there a way to require a user to be logged in to see the image/attachments?

T3MEDIA 05-02-2005 02:09 PM

Quote:

Originally Posted by anarchystar
if you have .htaccess file control you can put the following lines in it:

Code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(forums\.)?yourdomain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google\. [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?search\?q=cache [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo\. [NC]
RewriteRule \.(gif|jpg)$ - [F]

This will allow only the domains listed to link to images on your site, notice that I have the line:
Code:

RewriteCond %{HTTP_REFERER} !^http://(forums\.)?yourdomain.com/.*$ [NC]
that is for the subdomain forums.yourdomain.com ... any subdomain you want to allow access to imgages must be listed as such also

I also allow search engine domains to link to my images fro cacheing of pages, but you don't have to. If you don't want search engines to cache pages, just remove those lines

and finally, the line:
Code:

RewriteRule \.(gif|jpg)$ - [F]
tells the script what kind of images to apply the rules to. you can also add .bmp's or .png's by adding a pipe and the new file extenstion like this:
Code:

RewriteRule \.(gif|jpg|png|bmp)$ - [F]

NICE ACTION!!!!!

WetWired 05-02-2005 03:34 PM

Yes, you can.

ImportPassion 05-03-2005 01:28 AM

Ok, the htaccess does not work in this instance. These are php files. I use htaccess all over the place for images.

I don't want to deny guests access to attachments.

So, can anyone implement this?

ImportPassion 06-18-2005 02:02 AM

last cry for help


All times are GMT. The time now is 09:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01731 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete