[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] SSI on Apache using .htaccess and XBitHack?



Craig S. N. <spikeone@xxxxxxxxxxxxxx> wrote:
> how to proceed.  I need SSI on an old site to run a script, and I'm trying
> to configure it so I don't have to change all the extensions to .shtm or
> .shtml on every page (which would be needed to use this script).  That
would
> just about would kill 3 years of marketing (or some would say marking) of
> leaving one's URL in various spots around the net, all pointing to pages
> ending with the .htm extension.   Does anyone know how to accomplish this
on
> Apache leaving the docs with .htm extension?

Here's one solution.  In /etc/httpd/conf/httpd.conf in between the
<VirtualHost> and </VirtualHost> tags for the site in question you can put
the following to allow SSI on pages with a .shtml extension.

AddHandler server-parsed .shtml
AddType    text/html     .shtml

You can specify which file extensions are parsed by the server by adding
them.  This should work.

AddHandler server-parsed .shtml .html .htm
AddType    text/html     .shtml

While I'm at it, you can add this so pages written in php for a site can be
given a .html extension so web surfers don't know it's not straight html.

AddType application/x-httpd-php3 .php3 .html

Steven {steven@xxxxxxxxxxxx}