Web Hosting Forums

Results 1 to 4 of 4

This is a discussion on Parsing HTML as PHP? in the Hosting Talk & Chit-chat forum
Using FrontPage (yeah, I know <sigh>), it tends to mess with anything that it doesn't manage. In particular, it goes after the "<?php" and "?>" ...

  1. #1
    Loyal Client
    Join Date
    Sep 2002
    Posts
    73

    Parsing HTML as PHP?

    Using FrontPage (yeah, I know <sigh>), it tends to mess with anything that it doesn't manage. In particular, it goes after the "<?php" and "?>" in some of my php statements. As a result, I end up editing pages after they're uploaded.

    Now I read in AletiaManual that my index.html file can be parsed as index.php by placing an .htaccess file containing the following in the same directory at the index.html file???

    <Files *.html>
    ForceType application/x-httpd-php
    </Files>

    Seems far too easy. Am I reading the manual correctly?

  2. #2
    Loyal Client
    Join Date
    Aug 2001
    Posts
    183
    Hi,

    Yes, it does the trick...
    All files ending in ".html" will be considered php files as ".php" files are...

    Jorge

  3. #3
    Loyal Client
    Join Date
    Sep 2002
    Posts
    73
    Follow-up question ... If I only want index.html to be parsed as php, then the first line becomes:

    <Files index.html>

    Correct?

    What if I want just two files parsed? Is the delimiter a comma? As in?

    <Files index.html, start.html>

    IS there an on-line reference I could use to answer these questions?

  4. #4
    Loyal Client
    Join Date
    Aug 2001
    Posts
    183
    Hi,

    You can find the information you are looking for at:

    http://httpd.apache.org/docs/mod/core.html#files

    and

    http://httpd.apache.org/docs/mod/core.html#filesmatch

    Jorge

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •