Portal Home > Knowledgebase > Articles Database > Include .html into .php (PLESK)
Include .html into .php (PLESK)
Posted by funmaza, 11-19-2007, 02:34 PM |
Hi,
I have a server running PLESK 8.2 (latest version). With PHP4 and 5 support. I want to include .php files into .html (which work fine on LINUX CPANEL but on on WINDOWS PLESK).
Please can anyone suggest how can i make my WINDOWS server work so that it includes .php into .html. (.php included in .php works fine).
ALSO i tried to add (application/x-httpd-php in IIS MIME TYPES to extension .html and even .php but it did not work.)
Is there a way ?
Kindly reply me as soon as possible.
I would be greatful
|
Posted by Srv24x7, 11-19-2007, 02:42 PM |
You can do that using .htaccess file as well.
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Save and close the .htaccess file. Upload it to your webserver (to your WWW root) and that's it!
|
Posted by funmaza, 11-19-2007, 02:44 PM |
thanx alot, for your kind help...
but i think .htacess dont work on WINDOWS
m i right ?
|
Posted by funmaza, 11-19-2007, 02:50 PM |
i tried writing:
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
in .htaccess and uploaded to httpdocs folder but didnt worked.
Hope someone post me the solution
|
Posted by david510, 11-19-2007, 09:13 PM |
funmaza,
You cannot use .htaccess for a Windows IIS server. By default IIS cannot run php on html pages. You can use .shtml or .php extension. To use .shtml pages, in the setup options, make sure SSI inlcudes is enabled. Another option is adding Javascript to the html pages.
|
Posted by Srv24x7, 11-21-2007, 12:35 AM |
My apologizes i didn't figured it was windows servers, The best option will be .shtml For .shtml pages check your setup options and make sure the option for SSI inlcudes is checked
|
Add to Favourites Print this Article
Also Read
mchost (Views: 708)