logo
Home XtGem- Templates- XtScript- bottom

subdomains

Any folder on your site can be accessed as a subdomain of your site
All you have to do is create the folder and add a index file
The index can then be accessed as http://subdomain.site.xtgem.com
This page is a subdomain

There are two ways to code for a subdomain which method you use will depend on what you want from the subdomain and your level of skill with html.
subdomain
First type
(recommended)
The first method uses the <base> tag this makes all relative links in the page relative to the site specified in the tag so if you set this
<base href="http://YOUR SITE.COM" />
In the <head> area of the page or the _headtags file.
You can then create the page in the subdomain folder using most of the building tools as normal

1/ relative links are relative to the main site NOT the subdomain

2/ links to pages or files in the subdomain folder MUST be full http addresses using the subdomain
ie:
http://subdomain.site.xtgem.com/folder/file
Subdomain
second type
If you do not add the<base> tag
These apply

1/ all relative addresses are relative to the subdomain NOT the main site

2/ links to pages or files in the main site MUST be full http addresses
ie: http://site.xtgem.com/folder/file

3/ your _header _footer _headtags files will not work for the subdomain if they contain relative addresses

4/ All address created by the building tool for links or images using the filebrowser will be incorrect
when the page is viewed as a subdomain

Both types of
subdomains
The _header _footer and _headtags files are still included from the main site
(_header and _footer can be switched off from the page options in the building tool)

Your css template will still apply

You can upload a separate favicon.ico file which will be used when the page is accessed as a subdomain
just upload it into the subdomain folder
(this subdomain has a different icon)


subdomains in filelist

If you wish to use your subdomain in a filelist function for a folder IN THE SUBDOMAIN
you can just specify it "template" followed by .file_name. instead of using .file_url.
i.e
http://subdomain.site.xtgem.com/folder/.file_name.
Subdomain filelist example
mminor.jpg
ngt.jpg
House_of_the_Rising_Sun.mp3
Some Control.mp3
SocialWebButtons-Set1.zip
123»
Url functions
Xt:url function will only return correct urls for the subdomains index file if it is named in the url of the page
ie;
http://subdomain.syntax.xtgem.com/index
if it is not named xt:url will return normal addresses
http://subdomain.syntax.xtgem.com
Output of xt:url
http://syntax.xtgem.com/subdomain/index
Powered by XtGem
About us Contact Forum topÂ