View Single Post
  #7  
Old 01-16-2007, 08:34 AM
The Finman's Avatar
The Finman The Finman is offline
 
Join Date: Jun 2006
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

.htaccess is for Apache.

While it is possible to install Apache on a Windows server...why?

Why wouldn't you just use Apache instead?

First, .htaccess files are very powerful tools, and they (along with .htpasswd) are also probably one of the most underrated server tools available to a web admin running Apache.

But I think using them falls outside of vBulletin modifications, simply because many vBulletin admins don't run Apache. And even though I personally dislike Windows ASP servers, there are plenty of admins that do like (or don't have a choice when it comes to) Windows servers. While it is possible to install Apache on top of Windows in order to make use of .htaccess...why?

I love using .htaccess files....as there are a bunch of other uses for .htaccess in addition to blocking IPs or password (.htpasswd) protecting folders.

For example, If you have a "troll" board that is directly linking to your site or board, and they are clicking through that link they and coming over and infesting your board with their nonsense...you can use an .htaccess file to send anyone clicking through that link to anywhere you want (it doesn't work if they copy and paste the link in their browser window instead of clicking through it, but most trolls are not that smart).

Many a time I have forwarded links posted to my board from trolls, to complety different web sites (and/or servers for that matter) that can contain malicious (or prank) scripts.

You really want to see the "troll fur fly"? Watch as other trolls click through that link and are sent to a real nasty web page, causing either harm or the appearance of harm to their computer.

Trust me,they are not too happy with the troll that posted that link which just screwed up their computer (remember they have been redirected to an entirely different web site and server).

Anyway, I've seen "troll' turn against "troll" as they start attacking and/or banning each other.

For example...

Quote:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http://www.troll_bulletin_board.com
RewriteRule /* http://www.malicious_website.org [R,L]
RewriteCond %{HTTP_REFERER} ^http://troll_bulletin_board.com
RewriteRule /* http://www.malicious_website.org [R,L]


If Troll "A" posts a direct link on www.Troll_Bulletin_Board.com to your board at www.My_Bulletin_Board.net and you put the above code in an .htaccess file in your root folder (just like .htpasswd you can put it in any folder you want to protect), when Troll "B" and "C" click on that link...they be sent directly to www.Malicious_Website.org instead.

Troll's "B" and "C" will not be happy with Troll ""A"" since he/she posted a link to a site that either screwed up their computer, or gave them a scare that something messed up their computer.

Here are some other great ways to use .htaccess

The problem is .htaccess only works on Apache, so Admins that aren't running Apache are basically screwed. While there are ways of accomplishing similar things with Windows...it's still a real hassle, and it leads back to...why?

Regardless, you can do some great stuff with .htaccess...but since not every vBulletin owner can use it, I'm not sure that this lends itself to a vBulletin hack.

Also for web admins that are running Apache and can use .htaccess, be careful...because .htaccess is powerful stuff. Banning IP ranges can knock out a whole (small) country or a part of a (large) country (state, city, Etc.) if you're not carful. Be sure you know what you are doing.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01157 seconds
  • Memory Usage 1,792KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete