mapping .php on .html

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Generale Cluster

    mapping .php on .html

    Hello I need apache to process .html file as if they were .php files.
    I cannot modify httpd.conf, so I've added a .htaccess file in the same
    directory where the html files reside.
    The .htaccess file contains this directive:

    AddType application/x-httpd-php .html

    When I load the html page, the browser pop-up a window asking to open or
    download the file, instead of opening the page.
    How can I fix it?

    Thank you

    --
    elimina unsampdoriano per rispondere via email


  • Shawn Wilson

    #2
    Re: mapping .php on .html

    Generale Cluster wrote:[color=blue]
    >
    > Hello I need apache to process .html file as if they were .php files.
    > I cannot modify httpd.conf, so I've added a .htaccess file in the same
    > directory where the html files reside.
    > The .htaccess file contains this directive:
    >
    > AddType application/x-httpd-php .html
    >
    > When I load the html page, the browser pop-up a window asking to open or
    > download the file, instead of opening the page.
    > How can I fix it?[/color]

    Methinks you want to change AddType to AddHandler. Otherwise, you're changing
    the Mime type.

    Shawn
    --
    Shawn Wilson
    shawn@glassgian t.com

    Comment

    • Generale Cluster

      #3
      Re: mapping .php on .html

      "Shawn Wilson" <shawn@glassgia nt.com> ha scritto nel messaggio
      news:415D83AB.B 80C9AB7@glassgi ant.com[color=blue]
      > Generale Cluster wrote:[color=green]
      >>
      >> Hello I need apache to process .html file as if they were .php
      >> files. I cannot modify httpd.conf, so I've added a .htaccess file in
      >> the same directory where the html files reside.
      >> The .htaccess file contains this directive:
      >>
      >> AddType application/x-httpd-php .html
      >>
      >> When I load the html page, the browser pop-up a window asking to
      >> open or download the file, instead of opening the page.
      >> How can I fix it?[/color]
      >
      > Methinks you want to change AddType to AddHandler. Otherwise, you're
      > changing the Mime type.
      >
      > Shawn[/color]

      Good, it works. Thanks
      --
      elimina unsampdoriano per rispondere via email















      Comment

      Working...