vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Prevent access from a certain URL? (https://vborg.vbsupport.ru/showthread.php?t=164210)

maipoman 12-03-2007 03:07 PM

Prevent access from a certain URL?
 
Hey! :)

I was wondering if there is a mod that prevents users from accessing the vBulletin forum from a certain domain?
I don't want them to click on that URL and enter my board. I would like to give them a error message or simply re-direct them elsewhere.
I've tried to search for something like this, but couldn't find anything. Does anyone know if it's possible to do this?

Awjvail 12-03-2007 03:13 PM

in .htaccess put the following:

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite\.com [NC]
RewriteRule .* - [F]

replace badsite with the site you want to block.

multiple domains:

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
RewriteCond %{HTTP_REFERER} anotherbadsite\.com
RewriteRule .* - [F]

Note the backslash before the domain.

If you don't have a .htaccess, you should create one and place it in your vB directory.

maipoman 12-03-2007 03:41 PM

Thank you! That worked like a charm! :)

I used to have a .htaccess file in my root folder before, to prevent abuse from some people who used Tor to get on anonymously, but that .htaccess file slowed down the server so much that I had to delete it. This didn't slow it down at all! So thanks again!

maipoman 12-06-2007 09:35 PM

Just one more question... Is there a way to redirect the traffic to a different site, instead of just giving them the "You're not authorized to view this site"-page?


All times are GMT. The time now is 02:05 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.01520 seconds
  • Memory Usage 1,706KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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