../ in SSI
I am in the process of a website redesign for a local historian. She currently uses notepad to create her site and every file is in a single directory and every file contains all the coding for a single page. Here site is growing rapidly, tracing the history of more and more families.
I’m trying to layout her new site with each family in its own directory and use Server Side Includes (SSI) to simplify her coding. I’m also using Variable HTML to allow her to float her navigation from the bottom of each page to the sides as the page width increases.
When I put my first cut of a “How To” manual on line for her to see (note this is still being done in my own directory, not her website yet) I discovered a problem with SSI on my Linux hosting server. Basically, the “../” does not work in the filenames. I know that I can just duplicate the included files for things like banner and signature in every family directory, but since these items will be identical on every page of the website, I want them to exist only once in the root directory.
So, finally my question, does anyone know how to make the “../” work on Linux?
A complete demo of the problem is viewable at http://bitwarehosting.com/MIM/HowTo/ the page is full of “an error occurred while processing this directive” messages. One appears for every “../” included file. You can see the coding of the main structure of the new site at http://bitwarehosting.com/MIM/HowTo/ssi.shtml . You can see a picutre of the directory layout at http://bitwarehosting.com/MIM/HowTo/chart.shtml. You can also get a full description of what I'm trying to do by following the links on any of these pages. Use this link to see what these pages should look like: http://bitwarehosting.com/MIM/. Note that her home page does NOT contain a link to the how to section, that isfor her eyes only. Also, feel free to adjust the width of yoru browser screen and see how the design of the site changes; your comments on that are welcome also.
Please note, these pages were designed to match what the historian was doing with notepad.
I looked into using include virtual and creating an Include directory, but on my local IIS server the initial / takes me to c:\Inetpub\wwwroot I’m not sure where this will take me on a Linux server with virtual domains.
So, any suggestions on how to make all this work? Like I said, my fallback is to just duplicate the 5 root based included files in every sub directory.
Thanks in advance for any feedback that I receive
I would recommend using "/". Depending on how the virtual servers have been configured it might take to to the equivalent to "webroot" or it might to take you to the uppermost folder of that virtual server. Give it a try and post back here if it doesn't work and I'll give a real stab at it using my linux box.
Thanks for the response criteron9,
I tried that on my IIS box and it took me to c:\Inetpub\wwwroot . I also tried it on my reseller account and can't find where it is takign me. I don't have complee access tothe Linux reseller box, so I can't trace it completely.
I gave it a quick try on my linux box and found that "/" takes me consistently to the highest directory under the virtual server. Ex: I have a subdomain of mine.example.com. The file system is that all virtual servers reside in the "/home" space and are delineated by logon. Using "/" puts me at "/home/mine/www/". I also have another domain of example2.com and that resides on the file system at "/var/www/" so when I use "/" I am placed at "/var/www/".
Does that help?
I'm running a test on my servers at AIT and will post my results when I am done. My problem still exists in that my home server treats / as c:\Inetpub\wwwroot and whatever the AIT server does will not match. That will make it difficult to test at home, then deploy the exact coding. I'm sre there is a workaroudn for that, like naming the include directories with domain tags, like /inc-thisdomain and /inc-thatdomain. Then I could just have those directories in c:\Inetpub\wwwroot on my development system and in the root of my virtual hosting domain on the AIT server. First indication at AIT are thet / might very well take me to the root of each virtual domain. If that continues to be the case, this is a solution that might work. Still wish I could get the ../ to work properly, but you can't alwasy have the perfect solution.
PS: I use that name because I was taught all about computers by the Army in 1967!