Subdomains

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?ISO-8859-1?Q?Fran=E7ois_de_Dardel?=

    Subdomains

    I just got my own domain at dardel.info
    My host allows me to create subdomains.
    Let's assume I have created music.dardel.in fo
    On my computer, the files are in a folder of my site: mySite/music (or
    \music for the PC guys).
    If I have a file (assume style.css) in the main folder, how can I link
    it for the pages in my subdomain?
    it seems that
    <LINK REL=STYLESHEET HREF="../style.css" TYPE="text/css">
    does not work. Must I put the _absolute_ reference in the files of my
    subdomain:
    <LINK REL=STYLESHEET HREF="HTTP://dardel.info/style.css" TYPE="text/css"?

    --
    François de Dardel

    Faber est suae quisque fortunae
    Enlever le quatorze pour m'écrire
    Remove fourteen in the address to send mail

  • Rik

    #2
    Re: Subdomains

    François de Dardel <dardelf14@noos .frwrote:
    I just got my own domain at dardel.info
    My host allows me to create subdomains.
    Let's assume I have created music.dardel.in fo
    On my computer, the files are in a folder of my site: mySite/music (or
    \music for the PC guys).
    If I have a file (assume style.css) in the main folder, how can I link
    it for the pages in my subdomain?
    it seems that
    <LINK REL=STYLESHEET HREF="../style.css" TYPE="text/css">
    does not work. Must I put the _absolute_ reference in the files of my
    subdomain:
    <LINK REL=STYLESHEET HREF="HTTP://dardel.info/style.css"
    TYPE="text/css"?
    Yes, another domain, and a stylesheet outside it's document root would
    require an absolute reference.

    http://music.dardel.info/../ doesn't make sense, and isn't accessable to
    the visitor.
    --
    Rik Wasmus

    Comment

    • Michael Fesser

      #3
      Re: Subdomains

      ..oO(François de Dardel)
      >I just got my own domain at dardel.info
      >My host allows me to create subdomains.
      >Let's assume I have created music.dardel.in fo
      >On my computer, the files are in a folder of my site: mySite/music (or
      >\music for the PC guys).
      That's just one way of setting up a subdomain, there are others. In fact
      the above is a rather bad one, since it allows to access the subdomain's
      content with a URL relative to the main site:

      http://music.dardel.info vs. http://dardel.info/music

      The latter might lead to unexpected results. If possible the document
      root of the subdomain should be placed _outside_ of the main site's
      document root. Then both sites will be completely separated, as it
      should be.
      >If I have a file (assume style.css) in the main folder, how can I link
      >it for the pages in my subdomain?
      >it seems that
      ><LINK REL=STYLESHEET HREF="../style.css" TYPE="text/css">
      >does not work. Must I put the _absolute_ reference in the files of my
      >subdomain:
      ><LINK REL=STYLESHEET HREF="HTTP://dardel.info/style.css" TYPE="text/css"?
      Yes. From a browser's POV a subdomain is a completely different server.
      To access such resources you always have to use an absolute URL.

      Micha

      Comment

      Working...