Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 6 of 6

This is a discussion on SSI Question - Subdomain accessing main domain. in the Shared & Semi-Dedicated forum
I keep running into a little snafu with my website, trying to condense the header/footers and sidebars into a nice tidy 3 files instead of ...

  1. #1
    JPC Member
    Join Date
    Nov 2001
    Location
    in that server dust bunny
    Posts
    47

    SSI Question - Subdomain accessing main domain.

    I keep running into a little snafu with my website, trying to condense the header/footers and sidebars into a nice tidy 3 files instead of the code in multiple pages for my main and subdomains. With that.. here is my question.

    I have a SSI snipet that includes a header file, however this header is not pulled when the visitor hits the subdomain website, only the main domain website.

    called from subdomain (does not work)
    #include file="/home/username/public_html/header2.html"

    called from main domain (works fine)
    #include virtual="./header2.html"

    (I've flip flopped virtual and file, but I have been unable to get it to properly pull the header file).

    Is this possible?

    thanks.
    ---
    "you must learn the art before you can teach the craft."

  2. #2
    Old Hillbilly Connie's Avatar
    Join Date
    Sep 2001
    Location
    Hills of Missouri
    Posts
    2,648
    Try this. You may have left part of the include off by accent but what you posted above won't work at all. The following will work with a folder below root. I don't know about a subdomain. You might need to do an absolute path instead of a relative path.

    <--!#include file="./file name/header2.html" -->

    Forum Moderators - Jag Staff

    Spam Whackers Blog - Dedicated to fighting Spam and providing General SEO Tips
    Organize your Kitchen or purchase Kitchen Accessories at Condells
    Ihelpyou Forum - Dedicated to "Best Practices" SEO

  3. #3
    JPC Member
    Join Date
    Nov 2001
    Location
    in that server dust bunny
    Posts
    47
    yeah, I purposely left off the begining and ending brackets because I did not know if the forum would accept that through as code or not.

    ./ did not work, I'm probably going to ask support because I've even googled and I see all sorts of lil'hacks people have done.

    Just curious if this has popped up before. I'm sure it has.
    ---
    "you must learn the art before you can teach the craft."

  4. #4
    JPC Member
    Join Date
    Nov 2001
    Location
    in that server dust bunny
    Posts
    47

    ...

    well I created a ticket, basically there is no way to do it when you specify a subdomain address like subdomain.maindomain.com, instead you have to use www.mydomain.com/subdomain and then it will work properly.

    anyways, did that and it appears to work just fine.
    ---
    "you must learn the art before you can teach the craft."

  5. #5
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    OMG!!!

    You guys are still using SSI?
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  6. #6
    JPC Member
    Join Date
    Nov 2001
    Location
    in that server dust bunny
    Posts
    47

    uhh..

    I use a mix of that and php.. why?
    ---
    "you must learn the art before you can teach the craft."

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
  •