Home XtGem- Templates- XtScript- bottom


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.
First type
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
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
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.
Subdomain filelist example
Some Control.mp3
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
if it is not named xt:url will return normal addresses
Output of xt:url
Powered by XtGem
About us Contact Forum top