/    Sign up×
Community /Pin to ProfileBookmark

One server, two domains, want same page

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.

to post a comment
Web Hosting

6 Comments(s)

Copy linkTweet thisAlerts:
@toicontienAug 16.2006 — 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):

<i>
</i>/
..../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:
[code=html]<!-- #include file="../../shared/page.html" -->[/code]
Copy linkTweet thisAlerts:
@ray326Aug 17.2006 — If it's on a *nix box just make one of those a soft link to the other.
Copy linkTweet thisAlerts:
@Duke_WillauthorAug 17.2006 — What does "soft link" mean?
Copy linkTweet thisAlerts:
@toicontienAug 17.2006 — 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
Copy linkTweet thisAlerts:
@ray326Aug 17.2006 — 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'.
Copy linkTweet thisAlerts:
@rhsundergroundAug 17.2006 — moved to 'domain' forum.
×

Success!

Help @Duke_Will spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...