TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   setting up multiple sub domains on local (http://www.talkphp.com/general/2208-setting-up-multiple-sub-domains-local.html)

sarmenhb 02-08-2008 12:12 AM

setting up multiple sub domains on local
 
im using windows xp pro


i know how to set a subdomain like --> subdomain.domain.com
but how do i create another subdomain like --> sub.subdomain.domain.com ?

ReSpawN 02-08-2008 10:19 AM

Ehm that isn't possible as far I know. A SUBDOMAIN is a domain UNDER the main domain ... it cannot go sub.sub.sub.sub.sub.domain.com.

Why? w.w.w.domain.com (shitty ass str_replace stuff in the url) is the main domain, with a subdomain www. is replaced by sub. ;-)

Nor 02-08-2008 01:05 PM

I had a sub sub domain before on my server:

forums.freehostingdomainname.somehost.com heh..

ReSpawN 02-08-2008 01:39 PM

Like I sad, as far as I know.

[Parent] => Domain.com
[Child] => sub.Doman.com
[Infant?!] => sub.sub.Domain.com

sarmenhb 02-08-2008 02:49 PM

Quote:

Like I sad, as far as I know.

[Parent] => Domain.com
[Child] => sub.Doman.com
[Infant?!] => sub.sub.Domain.com
i doubts its an infant its just another child named child[1] or [2]

ReSpawN 02-08-2008 03:03 PM

Quote:

Originally Posted by sarmenhb (Post 10436)
i doubts its an infant its just another child named child[1] or [2]

Seriously, do you thing I was being serious? Maybe I should express more sarcasm in my posts from now on.

Let me rephrase that.

Code:

[Parent] => Domain.com
[Child] => sub.Doman.com
[Infant?!] => sub.sub.Domain.com **WARNING**SARCASM**WARNING**


Salathe 02-08-2008 03:58 PM

You stated that you're using Windows XP Pro, but that is not enough information for us to give you a usable solution. Are you using IIS, Apache or another web server?

As for the domain "children", they're counted in levels usually. For example:
Code:

L3  L2      L1
www.mydomain.com

com is the first level domain, mydomain is the second level domain and www is the third level (sub)domain.

There is no reason why you can't have fourth (fifth, ..., twentieth, nth level subdomains) at all. For example, the following is a perfectly valid domain:
http://lets.get.up.to.domain.level.ten.for.talkphp.com/

wGEric 02-08-2008 06:25 PM

If you are using Apache you can use mod_rewrite. You can create dynamic virtual hosts using mod_vhost_alias. mod_rewrite is probably the easiest. Something like this would work.

Code:

RewriteRule ^([^.]+)\.([^.]+)\.domain\.com(.*)    /path/to/files/$2/$1$3
With this domain, http://t1.t2.talkphp.com/, it would look for files in, /path/to/files/t2/t1



Why is it replacing my link with something that I don't want? ... Look at the status bar to see the link.

Edit by Salathe: I've fixed your link. There's an option called "Automatically retrieve titles from external links" in the advanced (not quick) reply page. It is automatically enabled, and I'm afraid I can't see an option for users to automatically disable it. It's an annoying "feature" I'd be happy to see the back of. P.S. Sorry for the long edit, I should've just replied.


All times are GMT. The time now is 04:21 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0