This is a discussion on apache2 processing php files with html extensions within the PHP Language forums, part of the PHP Programming Forums category; Hello, Apache2 on Unix, with php support compiled in as a dso. Currently to get support on a page the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
Apache2 on Unix, with php support compiled in as a dso. Currently to get support on a page the page has to be renamed with a .php extension. I don't want to do this, i'd have to rename several dozen pages plus change all the links within a page. How would i make apache2 handle php processing for all pages that have either .php, .htm, or .html extensions? Thanks. Dave. |
|
|||
|
Add .html to this php directive in php.ini
1)search for this in php.ini AddType application/x-httpd-php 2) .html at the end of the line like this AddType application/x-httpd-php .php .html if you want htm page to run add .htm .. AddType application/x-httpd-php .php .html .htm 3)restart Apache... If you are not having access to php.ini.. put it line 2 in .htacess file and place it in your webroot... Hope this helps.. Thanks, sharma |
|
|||
|
Hey sorry,
Its not in php.ini... Its in Apache's configration file, httpd.conf, you need an AddType directive that matches scripst ending in .php with application/x-httpd-php. 1)search for this in php.ini AddType application/x-httpd-php 2) .html at the end of the line like this AddType application/x-httpd-php .php .html if you want htm page to run add .htm .. AddType application/x-httpd-php .php .html .htm 3)restart Apache... If you are not having access to php.ini.. put it line 2 in .htacess file and place it in your webroot... Hope this helps.. Thanks, sharma |