PDA

View Full Version : yourname.vbulletin.com (Subdomain Redirection)


Overgrow
05 Feb 2003, 13:00
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 (http://www.vbulletin.org/forum/showthread.php?s=&threadid=39332&highlight=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.

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
05 Feb 2003, 15:24
MM i will try it on a localhost (maybe it works) if i set an adress for it

PSI|Dr-X
05 Feb 2003, 15:50
Awsome it works :D *clicks install*

corsacrazy
05 Feb 2003, 16:19
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
05 Feb 2003, 16:21
Looks very nice - i'll be sure to test this in the future :)

- miSt

Overgrow
05 Feb 2003, 17:40
>>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
05 Feb 2003, 17:48
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
05 Feb 2003, 18:10
Btw does this redirect or actually show the correct page?

Overgrow
05 Feb 2003, 18:19
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
05 Feb 2003, 18:37
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

Overgrow
05 Feb 2003, 18:44
>>-Add PHP to your root index.php

"ROOT" should always mean Document Root..

http://www.yourdomain.com/ROOT

So to answer your question, vbhome lite index.php :D

corsacrazy
05 Feb 2003, 19:34
ok cheers ill let you know how i get on !

corsacrazy
05 Feb 2003, 19:51
nope not workin :(

i dont think that my *.yourdomain.com responds

2 b able to create a subdomain i have to

) Open your ftp manager up and connect in to your web space.
2) Click the folder mainwebsite_html.
3) In this folder add a new folder.
4) Name the new folder subdomain.yourdomain.com where subdomain and domain and your settings, e.g. forum.eukhost.com
5) Upload your desired files to this folder.
6) View this folder by going to http://subdomain.yourdomain.com, e.g. http://forum.eukhost.com.

Overgrow
05 Feb 2003, 19:57
Yup.. before you even bother trying to install it, be sure to meet the requirements-- your server must respond to ANYNAME.yourname.com with your default page or it won't work. Your tech support may be able to set up Wildcard DNS for you.

corsacrazy
05 Feb 2003, 20:00
wen i goto anyname.mydomain.com it sez HTTP 404 - File not found does that mean my server is respondin lol

Dolby
05 Feb 2003, 22:42
Works great on my guild site (using vbportal).
example: http://dolby.eqgov.com

thanks!
*clicked install*

PSI|Dr-X
06 Feb 2003, 07:32
Works great by me too if someone has probles with 404

You must enable Wildcards :P

corsacrazy
06 Feb 2003, 19:17
ok wildcards enabled ! just w8in 4 the dns to update !

Lionel
07 Feb 2003, 03:58
this is an interesting hack. I wish someones takes over the other hack attempt that tries to give each member its own mini site, by breaking the profile in many pages, and perhaps give them an extra page.

One could always keep the http://membername.site.com on top by placing it in an invisible frame. Any attempt to access regular site could break out of frame.

N!ck
21 Mar 2003, 19:33
THANKS FOR AN AWESOME FEATURE! My users will love it.

See here: http://www.v-driveboat.com/showthread.php?s=&threadid=33

Erwin
18 May 2003, 14:08
This is a very cool hack.

I am using this with Velocd's custom HTML page hack, to give my users a custom webpage... very cool. :)

Dean C
18 May 2003, 15:07
Hey i forgot about this hack :)

Unfortunately i can't use it as i already have a service set up using postnuke for subdomain homepages :)

- miSt

Koutaru
18 May 2003, 17:11
I'm still pondering over whether I should use this for the member profile or the custom page

Or maybe both ;)

Erwin
18 May 2003, 21:48
I've modified this hack quite a bit now - moved code to member.php, added stuff to .htaccess, modified the custompage hack.

You have a choice of 3 URLs to use:

username.domains.com OR

www.username.domains.com OR

www.domains.com/home/username

I've made it so that instead of basing it on the userid, it is based on the username, so .htaccess cloaking works. :)

gmarik
09 Jun 2003, 18:18
Erwin,
Can you tell me how did you do that:
www.domains.com/home/username?
It's what I was thinking of the last two days...

AmericanWoman
21 Oct 2003, 15:19
Erwin, are you planning to release your modifications as an update or add-on to this hack? I'd really love to see them.

Going to install the base version of this on my dev site tonight and see how it goes...

Thanks to all the hackers who've worked on this!

colicab-d
08 Feb 2004, 09:59
just about to test this on a vbulletin 3 site, theres no code changes to vb so it should work ok :D will let u all know ;)

M1th
10 Feb 2004, 18:53
Hmm, what if there are two usernames like "Member 1" and "Member_1" what would happen then?

MarkB
11 Feb 2004, 15:18
How could you get this to work with forum names?

influence
01 Apr 2004, 14:33
can someone port this over to vb3.0 please

Geographic2
06 Apr 2004, 07:14
Good luck contacting Overgrow. Lol.

error_22
09 Dec 2004, 18:57
Hi,

I really want this to work but for some strange reason it doesn't. I have Wildcard DNS for my domain.

I don't get any errors or something, it simply doesn't work. any ideas?

Thanks
Niklas

T3MEDIA
20 Apr 2005, 22:54
darn was told about this but it seems outdated. Erwin do you have the adjustments you did. Are you willing to put them up?

I was asking about something just like this. For latest vb.