Welcome to WebmasterWorld Guest from 54.81.69.220

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Can I <#include virtual> from another domain?

I'm trying to use the same text on 3 different domains

     
2:21 am on Nov 30, 2003 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 12, 2003
posts:1208
votes: 0


I have a good reason for wanting to use some of the same content across three different domains, and it's completely unrelated to SEO, so no flames, please. :)

I'd like to just update a single file and use that as the source for all three domains, but <#include virtual> only seems to work when it's calling in a file that exists on the same domain. If I try to call in a file from another domain the browser says "An error occurred when processing this directive."

Is there a way to use SSI's that reference other domains, or alternatively, is there some other easy way to include boilerplate content across three domains and have it stored only in one file? (And a PHP database would not constitute an "easy way" :) ).

Thank you very much for your help, -MBJ-

4:52 am on Nov 30, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Critical to the answer is the question, "Are all three domains hosted in the same server account?" If so, you can include the files. If not, you can't do it, because #include virtual works in the local file system, not with URLs.

Jim

4:54 am on Nov 30, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 2, 2002
posts:1167
votes: 0


I think you can just write the include as:
<!--webbot bot="Include" U-Include="http://www.otherdomainname.tld/folder/file-name.html" TAG="BODY" -->
5:12 am on Nov 30, 2003 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Feb 12, 2003
posts:1208
votes: 0


KevinPate, that code doesn't work -- no error, it just remains in the source of the file in the browser without getting replaced by the external file.

JDMorgan, all domains are indeed on the same server account, but I don't know how to make it work. My webhost told me it's impossible, but they've given me incorrect info before, and I swore I saw an example somewhere once where this worked, so I thought I should try to see if there's a way to make it go.

At the root of my account we have:

/domain1.com/index.html
/domain2.com/index.html
/domain3.com/index.html

But within any "index.html" file, if I reference a file "/foofoo.html", the server looks for it *in the domain that index.html is in*. I can't back up and reference the very top/root of my account -- at least I don't know how to do so.....

5:17 am on Nov 30, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Use *nix links. Create a link in each "home" directory, and point it to the real file, which can be anywhere in your account. Note that some FTP clients won't let you create links, so you may have to Telnet in to do it, but once it's done, it's done and the only thing you have to mess with is the target file, not the links.

<edit> Half-finished thoughts: Then include the link in your code instead of the file - the link will be accessible to the code, and point to the actual shared file... It's actually a proxy for the file, as if the shared file was really there in the local directory. </edit>

Webbots are a FrontPage thing, so you may not have FP extensions installed or enabled.

Jim