NYCPHP Meetup

NYPHP.org

[nycphp-talk] Parse HTML Files as PHP

Artur Marnik artur at marnik.net
Fri Feb 20 16:48:41 EST 2009


Hi Peter,

This is exactly what I did on my server about 10 years ago when I 
started my journey with PHP. I don't remember why but I wanted to keep 
all my extensions as .html so I used it for few years

There is only one con - all your files will be parsed by PHP. So if you 
want to use some caching, static content etc it will still use PHP 
engine for display - I would say not recommended for very high traffic.
For small website It should be ok

Artur


Peter Sawczynec wrote:
> I want to get my *. htm and *.html files to be parsed as PHP files.
> With shared hosting I don't have access to Apache conf, but I can put
> .htaccess files 
> in my dirs. So I am planning to add this line:
> 
> AddHandler application/x-httpd-php .html .htm
> 
> … in the .htaccess file.
> 
> Anyone have any comment on this strategy pro or con?
> Has anyone done this and was satisfied with the results?
> 
> Warmest regards, 
>  
> Peter Sawczynec 
> Technology Dir.
> blūstudio 
> 941.893.0396
> ps at blu-studio.com 
> www.blu-studio.com 
> 
> 
> 
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> http://www.nyphp.org/show_participation.php



More information about the talk mailing list