Sample Web application (Re: Python vs PHP)

JanC usenet_spam at janc.invalid
Thu Jul 10 06:07:16 CEST 2003


Moshe Zadka <m at moshez.org> schreef:

> [I was *shocked* to discover, for example, I can't associate
> all .html files in a directory with PHP. I am sure it is a great
> visibility booster for PHP to have pages end with .php, but I didn't
> care much for it.] 

I have no problems doing that with Apache?

Just create a .htaccess (or whatever it is on your system) in that 
directory and put the following line in it:

  AddType application/x-httpd-php .html

Also make sure httpd.conf allows you to define types in a .htaccess file.
If you want, you can set the "local AddType" in httpd.conf too, I think.


(Tested with Apache 1.3.27 + PHP 4.3.0 on my Win98 desktop)

-- 
JanC

"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9




More information about the Python-list mailing list