The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How do you make an html file run as php?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #29365

    I’m trying to have the HTML files in a certain folder get parsed as PHP files. I’m on JustHost, so I can’t change the .conf files. I’m trying to use the htaccess trick:

    Options +FollowSymLinks

    RewriteEngine On
    RewriteBase /

    AddType application/x-httpd-php .html

    But it won’t work; any time I try to visit the page, Firefox is asking to download it, like a .zip or .mov file. And if I use AddHandler instead, it just loads the page with the php code unparsed.

    Is there something missing with my code? Can I even do it this way?

    Chris Coyier

    That’s the only way I know of =/

    Well… maybe there is something you can do to the server configuration to force it too? php.ini? apache config?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.