Click to See Complete Forum and Search --> : One server, two domains, want same page


Duke Will
08-16-2006, 07:09 AM
Say I have two domains on my server, one.com and two.com. I want page.html to be on both. But I want to only "maintain" the content on one.com so I don't have to do it twice. Can I use an "include" tag or something to call up page.html from one.com and display it in the browser when someone hits two.com/page.html? (.shtml?)

I don't know how to do this, I tried

<!--#include file="http://www.one.com/page.html" -->

and named my page on two.com to be two.com/page.shtml

... that is .shtml

but it didn't work.

toicontien
08-16-2006, 10:09 AM
Server side includes only work with local files. Something like below may help you out, considering the following directory structure on a server (entirely fictitious):


/
..../export
......../httpd
............/www.one.com
................/docs
....................index.html
............/www.two.com
................/docs
....................index.html
............/shared
................page.html

From each of the index.html files, you might be able to SSI the page.html file using the code snippet below:
<!-- #include file="../../shared/page.html" -->

ray326
08-16-2006, 10:52 PM
If it's on a *nix box just make one of those a soft link to the other.

Duke Will
08-17-2006, 04:29 AM
What does "soft link" mean?

toicontien
08-17-2006, 09:04 AM
I think the technical term is Symbolic Link. In Windows this is called a Shortcut. I think MacOS calls it an Alias.

http://en.wikipedia.org/wiki/Symbolic_link

ray326
08-17-2006, 05:13 PM
Yes, "symbolic." A Win shortcut doesn't work the same as a symlink. It has to be interpreted by an application. A symlink is transparent to an application unless it's interested in knowing about it.

The *nix command that does the work is 'ln'.

rhsunderground
08-17-2006, 05:57 PM
moved to 'domain' forum.