Process HTML files as PHP files

  • : Function ereg() is deprecated in /home/mlsstudi/mikeshannon.com/new/includes/file.inc on line 895.
  • : Function ereg() is deprecated in /home/mlsstudi/mikeshannon.com/new/includes/file.inc on line 895.
  • : Function ereg() is deprecated in /home/mlsstudi/mikeshannon.com/new/includes/file.inc on line 895.
  • : Function ereg() is deprecated in /home/mlsstudi/mikeshannon.com/new/includes/file.inc on line 895.
  • : Function ereg() is deprecated in /home/mlsstudi/mikeshannon.com/new/includes/file.inc on line 895.
  • : Function ereg() is deprecated in /home/mlsstudi/mikeshannon.com/new/includes/file.inc on line 895.
  • : Function ereg() is deprecated in /home/mlsstudi/mikeshannon.com/new/includes/file.inc on line 895.
  • warning: Parameter 2 to acidfree_link_alter() expected to be a reference, value given in /home/mlsstudi/mikeshannon.com/new/includes/common.inc on line 2798.
  • warning: Parameter 2 to acidfree_link_alter() expected to be a reference, value given in /home/mlsstudi/mikeshannon.com/new/includes/common.inc on line 2798.

 In your .htaccess file (*nix servers only) you will need to place the following two lines:

AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html

From here on out your .htm and .html pages will be processed as PHP files by your web server but without actually having to use the .php extension on a given web page to run PHP code.  Pretty handy stuff if I do say so myself - this way you don’t have to 301 redirect a bunch of html pages if you wanted to start utilizing PHP

to pull in some template code within your existing html files. 

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
7 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.