HTML as PHP

From Hostek.com Wiki
Jump to: navigation, search


Steps to process HTML as PHP

Sometimes you may want to process PHP code inside your .html files. To do this, follow these simple steps for Windows 2008/IIS 7.5 servers:

  1. Open IIS
  2. Expand Server name in IIS
  3. Click Sites
  4. Find the site you want to change
  5. Double click the site in the Center Pane
  6. Open Handler Mappings
  7. Open the entry for "PHP_via_FastCGI", and copy the text in the "Executable" field, then click "Cancel" in the popup.
  8. Click the "Add Module Mapping" link on the left"
    1. Enter "*.html" (no quotes) for the Request Path
    2. Choose "FastCgiModule" as the Module type
    3. Paste the text you copied earlier into the "Executable" field
    4. Enter "HTML_via_FastCGI" as the Name, and click OK