www.webdeveloper.com
Results 1 to 2 of 2

Thread: Is is possible to put SSI on a different domain?

  1. #1
    Join Date
    Jan 2003
    Posts
    1

    Is is possible to put SSI on a different domain?

    Hi all,

    I was wondering if it's possible to put SSI (server side includes) on different domains?

    For example, let's say I have 2 web sites. They both need to have an identical bit of HTML on every page.

    Right now what I'd do is put the same SSI code on each site. Then when I modified that code, I'd do it twice.

    However, I'm wondering if there's a way to have the SSI code reside on only 1 of the 2 sites. Then in the site that does not have it, I would reference it to the other domain.

    Is that possible? If so how? Thank you in advance for your assistance.

    David Nguyen

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    You cannot use SSI alone to include something from outside of the server. But you can use SSI to include the output from CGI scripts. And if your server is running Perl, the CGI module and the LWP::Simple module than you can use

    <!--#include virtual="myScript.pl" -->

    and then run the following Perl script, named myScript.pl, on the server:

    #!usr/local/bin/perl
    use CGI qw(header);
    use LWP::Simple;
    print header, get 'http://wwww.w3.org/';
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles