Problem including files in subdomain


#1

I’m having a problem including a file from my main directory in a subdomain. File header.html is located in my main directory and is used by all the pages at that level. I also have a subdirectory one level below my main directory. Pages in this subdirectory should also include the header.html file.

For those pages, I’ve used:

This works fine if I access the page as:
http://www.mydomain.com/sub/page.html

However, for convenience, the subdirectory is also mapped as a subdomain. If I access the page as:
http://sub.mydomain.com/page.html
instead of including the file, I get a nice “[an error occurred while processing this directive].”

How can I work around this?


#2

This is a stab in the dark.
Firstly if Dreamhost are running Apache with the ability to parse all files for SSI using some sort of Xnithack on feature you might want to see if chmod -x filename.html (to make it executable) works.

Failing that does page.html renamed to page.shtml work?


Norm


#3

The page can execute fine. My current workaround is to copy the header.html into the directory of the subdomain and use

Based on observation, in this case, http://www.mydomain.com/sub/page.html will include the file from the main directory. http://sub.mydomain.com/page.html will include the file from the subdirectory.

So as long as I make sure to keep those files synchronized, I’m fine. But that’s kind of a pain I’d like to avoid!


#4

Would using the ‘ln’ command to link the header.html into the sub directory work since they’d then be sync’d okay?


Norm