vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   yourname.vbulletin.com (Subdomain Redirection) (https://vborg.vbsupport.ru/showthread.php?t=48553)

Overgrow 02-04-2003 10:00 PM

yourname.vbulletin.com (Subdomain Redirection)
 
SUBDOMAIN REDIRECTION v.1.0

Goal: Give every user a quick link to their profile or gallery or hacklist. Also add quick subdomains for anything else you want.

Usefuleness: I was jealous of the Yaxay profiles that were automatically assigned to each username.yaxay.com. Then I saw the hack by Minots: vBSubDomains. This did way more than I wanted it to-- I don't need to offer users redirection then have them point "porn.overgrow.com" to some kiddie site. So I duplicated what I thought Yaxay was doing-- and here it is.
Quote:

REQUIREMENTS:

OK, this is important. I can't help you with these requirements:

Your server must respond to blahblahblah.yourdomain.com by redirecting you to the default domain. If it does not do this already, you must ask your tech support if they can set it up. I did this by asking "Please setup Wildcard DNS for Overgrow.com. I would like *.overgrow.com to point to: /home/overgrow/HTML."

You must be using an index.PHP file as your document root file. Meaning when I hit your dot.com, it is serving me a PHP file. There are other ways around this using .htaccess but they are undesirable as they cause every hit to your main root domain to be processed through an additional php file.

Installation:

-Make sure *.yourdomain.com responds
-Add PHP to your root index.php

Difficulty: Somewhat Easy

Speed: Quick

Release: 1.0-- Feb 05, 2003

Hopping bunny: :bunny:

PSI|Dr-X 02-05-2003 02:24 PM

MM i will try it on a localhost (maybe it works) if i set an adress for it

PSI|Dr-X 02-05-2003 02:50 PM

Awsome it works :D *clicks install*

corsacrazy 02-05-2003 03:19 PM

i have tecks vbhome (lite) installed so that is my ROOT index.php, should i still add the code or can i just put it in like a new file say called index2.php ?

Dean C 02-05-2003 03:21 PM

Looks very nice - i'll be sure to test this in the future :)

- miSt

Overgrow 02-05-2003 04:40 PM

>>i have tecks vbhome (lite) installed so that is my ROOT index.php, should i still add the code or can i just put it in like a new file say called index2.php ?

The point is to put the code right on the top of your ROOT index.php. Since that is what most people are after on your domain, that should be as fast and uncluttered as possible. Don't bother including another file or sending it off to process before going to your root index.php--

With this code, it only does a few matching operations then runs as normal, with no database access additions, when people are just going to your normal root index. It should add virtually no overhead unless people are looking for a user's subdomain.

Overgrow 02-05-2003 04:48 PM

There's a lot more you can do with this as well. Since mine points to my user's galleries, I have another processing file doing some more work called /view in the root directory.

http://~shabang~.overgrow.com
my gallery

http://~shabang~.overgrow.com/view/pussy.jpg
any image can be referenced

Dean C 02-05-2003 05:10 PM

Btw does this redirect or actually show the correct page?

Overgrow 02-05-2003 05:19 PM

Header redirects.. you'll need more than a simple php hack if you want to go to a true /friendly/url/format. I believe fastforward outlines this somewhere around here!

corsacrazy 02-05-2003 05:37 PM

Quote:

Originally posted by Overgrow


Nope, the point is to put the code right on the top of your index.php. Since that is what most people are after on your domain, that should be as fast and uncluttered as possible. Don't bother including another file or sending it off to process before going to your index.php--

so i should add your code to my vb home light index.php or my forums/index.php ? cheers


All times are GMT. The time now is 02:02 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.01021 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete