Treating .html pages as PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • laredotornado@zipmail.com

    Treating .html pages as PHP

    Hi,

    I'm running PHp 4.4.4 on Apache 2. In a particular directory, I would
    like .html pages to be run thorugh the PHP interpreter -- i.e. have
    "<?php" tags evaluated. Note, that I only want this within a single
    directory and not the entire web server. How could I set this up?

    Thanks, - Dave

  • Kim André Akerø

    #2
    Re: Treating .html pages as PHP

    laredotornado@z ipmail.com wrote:
    Hi,
    >
    I'm running PHp 4.4.4 on Apache 2. In a particular directory, I would
    like .html pages to be run thorugh the PHP interpreter -- i.e. have
    "<?php" tags evaluated. Note, that I only want this within a single
    directory and not the entire web server. How could I set this up?
    Place the following in a .htaccess file in the directory you want this
    to happen:

    AddType application/x-httpd-php .html

    --
    Kim André Akerø
    - kimandre@NOSPAM betadome.com
    (remove NOSPAM to contact me directly)

    Comment

    Working...