[thelist] php on my index page?

Trent Whaley u233 at shaw.ca
Wed Jan 21 14:51:45 CST 2004


On January 21, 2004 11:33 am, Aaron Wormus wrote about "Re: [thelist] php on 
my index page?":
> What I do is just put a .htaccess in the folder with the following:
>
> AddType application/x-httpd-php .html
>
> This makes apache parse files ending with .html as php files!

> Roger H. wrote:
> >Evolters...
> >
> >So, obviously I could make my index.html an index.php page, but that's not
> > a default, right?...

Aliasing all .html files as .php is not a great Idea in my opinion. 

If the site includes any html files that do not include php, you're forcing 
unnescesary parsing.

If the site is edited by more than one person, it's faily likely that someone 
will eventually mess up and put <? in a file that has no reason to. 
Furthermore, if some of the people editing the site are uneducated or 
inexperienced, they may not know not to change any of the php (this has 
happened to a site I worked on).

It's much better in this case to just delete index.html, and let the webserver 
do it's job (serve the index.php).


More information about the thelist mailing list