SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    chicago
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Quick Question About Subdomains And A Snippet Of HTML

    Hello all ! I am hoping you could answer these quick questions for me.

    What I am trying to do is real simple, I'm sure. I just don't know how to search for it, as I'm not sure of the wording.

    Here it is in a nut shell :

    I have 1 index page / layout that I'd like to use for many subdomains. The only thing that would change really is the title and some text from site to site.

    Example : Let's say I'm trying to provide dating information across 10 cities (chicago.domain.com , newyork.domain.com, dallas.domain.com ...etc) And the index page is the same for all, with the same content , dating tips ..etc. What I need is the snippet of code that will pick up 'chicago' in the domain (chicago.domain.com) and place the word 'chicago' in the locations where I place the code. Real simple.


    Please let me know if 1) This is the correct board to post this on 2) If I am asking for this the correct way / or if there's a term for it that could make my search easier 3) If you have an example of requested code.

    Thanks so much for your time !

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need to use a server side language like PHP or ASP.

    There are plenty on tutorials on how to use templates in PHP on the web. I bet there are a bunch for doing it in ASP as well.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2004
    Location
    chicago
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can do it in php, I suppose. Does any one have a quick code snippet ?

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •