Server side includes and cgi

software development


I’ve moved from another hosting service and have two problems I haven’t been able to resolve.

On the old host, I had a server side include that would extract a random line from a text file and insert it in the page. The syntax was:

I also have a page with a .cgi extension that executes a perl script which dynamically generates a page that permits a user to search for the contents of the text file.

The link to the page is just the script’s file name:


The first line of cgi\script\myscript.cgi contains:

#! /usr/bin/perl.

What changes must be made to implement these on DreamHost?



1.) To use SSI at Dreamhost add this to your htaccess file:

AddHandler server-parsed .html
AddOutputFilter INCLUDES html

And this is the syntax for the on-page include:

<!--#include virtual="/directory/file.type" -->

2.) #!/usr/bin/perl is correct