[WEB4LIB] Re: migrating to php

Thomas Dowling tdowling at ohiolink.edu
Wed Sep 6 15:01:10 EDT 2000


> Just have php parse .html files instead of just .php or .php3 files.
> >From the php manual
(http://www.php.net/distributions/bigmanual.html):
> ---
> 17. Edit your httpd.conf or srm.conf file and add:
>
>      For PHP 3:   AddType application/x-httpd-php3 .php3
>      For PHP 4:   AddType application/x-httpd-php .php
>
>   You can choose any extension you wish here.  .php is simply the one
>   we suggest.
> ---
> Just add a line to your httpd.conf file like this:
>
> AddType application/x-httpd-php .html
>
> and restart your webserver.
> -Mark
>
>

This will run every .html file on your server through PHP, right?
Depending on whether you're using PHP in every directory, and the load
it places on the server, this may be a better solution than the
RedirectMatch I suggested before.  But if you only want to do PHP
parsing in certain directories, or if it slows down the server in
general (and I say this as someone who blithely has his whole server
parsing *.html for SSI), then you may want the more restricted solution
of using *.php filenames and a redirect.

As with Perl, "There's More Than One Way To Do It."

Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu



More information about the Web4lib mailing list