faqts : Computers : Programming : Languages : PHP : Installation and Setup : Web Servers : Apache

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

42 of 53 people (79%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How can you set up PHP to run in files with no extension like file, instead of file.php?

Jul 5th, 2000 11:01
Dan Thies, unknown unknown, dayatra shands, Mike Harrison,


Somewhere on your system (or your ISP account) you should have
a .htaccess file. Should be in your main
directory. Edit it to say something like :

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

This will allow all the .html files to be put through the preprocessor,
and it will honor any php statements in the .html file.

To force all files to be handled by the PHP processor, use:
ForceType application/x-httpd-php3
in .htaccess or httpd.conf