[Typo3] What is the best way to set up a multiple site with subdomains?

Gilles Deacur tronno22556 at gmail.com
Fri Dec 9 15:37:09 CET 2005

Michiel Roos wrote:
> Hey Giles,
>>"critterpal.com" is an addon domain that I have setup in a subdomain of
>>my main account that can be accessed as either
>>"critterpal.sunshinelocksmith.com" or
> Is this what you really want as an end result, if not, disable it for now.

When I type in www.critterpal.com, it actually goes to 
critterpal.sunshinelocksmith.com (or sunshinelocksmith.com/critterpal, 
I'm not sure) but it displays as www.critterpal.com because it's an 
addon domain.

>>I have Typo3 installed into a subdomain of "sunshinelocksmith.com" 
>>called "admin-maint" that can be accessed by typing in 
>>"admin-maint.sunshinelocksmith" or "sunshinelocksmith.com/admin-maint".
> So admin-maint.sunshinelocksmith.com appears to be your master domain.

www.sunshinelocksmith.com is my master domain, but I have Typo3 
installed in a subdomain (or folder) called "admin-maint".  I did this 
because I have an index.php file in the root of sunshinelocksmith.com 
and installing Typo3 into my "master domain" would knock my functioning 
site first page off-line.  So I put it in a subdomain thinking it would 
work the same admin-wise not thinking about the problems I'm having at 
the moment.

>>Typo3 then identifies the page id and serves the site.
>>This all works good, but every page has the
>>"admin-maint.sunshinelocksmith.com" in the browser and not
>>"critterpal.com" like it ideally should.
> That's because you told cpanel to redirect everything that comes in from
> critterpal.com to admin-maint.su ..  .. So don't blame the system, it does
> exactly what you asked it to do! 
> :-)

I told cpanel to add critterpal.com as a subdomain.

Should I then tell cpanel to remove the subdomain?

I already have the DNS pointing to the nameserver of my shared IP 
address. Do I keep the DNS pointing to the same nameservers?  I guess 
there really isn't much of a choice.  That's the only setting my name 
registrar gives me.

However, I can modify another name www.gotpet.net and use that as the 
domain "base" instead of critterpal.  I have a few extra settings to 
play with on that registrar, including http redirect and frame 
forward(yuck... no frames).
>>What trick do I need to do to correct this?
> There's no trick, stop redirecting already ;-).
> You appear to be set up properly, but you are mucking around with
> redirection in the cpanel where instead you should use typo3 domains.
> Your cpanel edits the appropriate vhosts files or whatever it needs to
> edit to get the server listening to all your domains and subdomains.
> The trick is to leave it at that and then have typo3 figure out what to
> show when an url is requested for a certain subdomain. I would start with
> trying to get sub domains to work first and leaving out the realurl for a
> start. You can try to add realurl once you have got your domains working
> properly.
> You should create a record of type 'domain' in the pageroot of where you
> want the critterpal.com site to start. You an add multiple domain records.
> The domain records also allow fore redirecting if needed, but please keep
> it simple for a start (try not to make yourself go crazy too fast ;-).

Yeah, I already have a domain listed in the pageroot as follows 
(secondary fields are on):

Domain: www.critterpal.com
Redirect to: {blank}
Transfer parameters {blank}


Domain: www.gotpet.net
Redirect to: {blank}
Transfer parameters {blank}

These are in the root page.  I have "Home Page" shortcut to the root page.

That's good.  (I think.)

Also, in my AutoParser template setup field I have all this crap:

config.simulateStaticDocuments = 0
config.baseURL = 1
config.baseURL = http://admin-maint.sunshinelocksmith.com/
config.tx_realurl_enable = 1
config.prefixLocalAnchors = all
# Configuring the Auto-Parser:
plugin.tx_automaketemplate_pi1 {
     # Read the template file:
   content = FILE
   content.file = fileadmin/critterpal/template.htm
     # Here we define which elements in the HTML that
     # should be wrapped in subpart-comments:
   elements {
     BODY.all = 1
     BODY.all.subpartMarker = DOCUMENT_BODY
     HEAD.all = 1
     HEAD.all.subpartMarker = DOCUMENT_HEADER
     HEAD.rmTagSections = title
     TD.all = 1
     # Prefix all relative paths with this value:
  # relPathPrefix = http://www.critterpal.com/

(I've played with www.critterpal.com and other names for the baseURL but 
my css and images break, so this is working at the moment, but probably 
isn't correct.)

Notice the relPathPrefix as well.  This is currently commented out, but 
I was playing with this to see if I could get things working.  I've 
played with several varieties of the path.

> Hope this helps a bit more, Cheers,
> Michiel Roos

Hey, I REALLY appreciate you taking time out of your day to help me with 
this.  I really pored over the documentation and googled my fingers off 
to get this to go so I wouldn't need to bother anybody with this, but I 
was a day away from switching to phpwcms.  I really, really, really 
didn't want to go the "quitter" route.

Gilles Deacur
Sunshine Locksmith Team

More information about the TYPO3-english mailing list