NYCPHP Meetup

NYPHP.org

[nycphp-talk] web page file extensions

bpang at bpang.com bpang at bpang.com
Wed Apr 28 11:16:17 EDT 2004


Isn't it considered wasteful to have the server parse .html pages?
Using the .php extension tells the server to only bother parsing those
pages that need it.
Use the .html extension for those pages that truly are static.
Although, I have to admit, I rarely create any page these days that is not
parsed. If that is the case for you, then I suppose that parsing .html
would be net-net the same thing.

If you have one of Verio's VPS setups, you can find your httpd.conf file
and edit it yourself, too.
Use iManager to submit an Apache restart request.
php_info() will tell you where the httpd.conf file is...
/usr/etc/local/httpd.conf
but remember that that location starts from your account's root dir.. so
it's really
~/usr/etc/local/httpd.conf



> Test an .htaccess file with the following:
>
> AddType application/x-httpd-php .htm .html
>
> Depending upon the server configuration, it may allow you to parse .htm
> and
> .html files as .php
>
> Brian
>
> On Wednesday 28 April 2004 10:52 am, Aaron Fischer wrote:
>> Greetings,
>>
>> I'm starting to work on a project for a new client and am in the
>> process of familiarizing myself with their site.  They are being hosted
>> by verio.net with PHP and MySQL support.  I ran a php_info script and
>> to my surprise got nothing back.  After a few emails back and forth
>> with their support team, I found out that in order for php to be
>> executed the file extension needs to be .php, .xml, or .shtml.  I am
>> used to a server environment where I can have pages ending with .html
>> and the php code is still executed just fine.
>>
>> So, my question is, is this fairly normal to be constrained to those
>> file types in order to have php be executed?  It seems inconvenient and
>> unnecessary, IMO, but I don't have enough experience with different
>> server environments to feel qualified to make this judgment.
>>
>> Overall, I feel like my client could be getting the same services they
>> are paying for now for a much cheaper price from alternative hosts.




More information about the talk mailing list