|
Posted by J.O. Aho on 09/07/07 04:59
dorayme wrote:
> In article <V0YDi.21$2A5.10@newsfe06.lga>,
> "\"Crash\" Dummy" <dvader@deathstar.mil> wrote:
>
>>> I made an .htaccess file to allow my .html files to be parsed for
>>> any php on them. It has:
>>> AddType application/x-httpd-php .html
>> For the reasons cited by others, I think that is a lousy idea. It is much
>> simpler to selectively use the .php extension to mark html files with php
>> code
>> in them. If for some obscure reason you want all files to have the same
>> extension and be parsed for php code, you can give them all the .php
>> extension,
>> even if they don't have any code. They will just be passed unchanged.
>> --
>
> All the files have php in them.
Then use .php
> On another bigger site of mine, there had been heavy bookmarking
> of files in the past, parsing for php on the .html files did not
> disturb this.
You will pain yourself into a corner if you try to be backward compatible with
the links. Just look at microsoft, they still struggle with the same old
security flaws as they kept on trying to be backward compatible instead of
securing the mess.
> And not having to rename all and all internal links
> and load up was saved.
Internal links is easy to fix with sed, will just take a few seconds to fix
them all, in all files.
> I was very pleased to have .html scanned
> for php. Noticed no slowdown at all.
You would notice the difference if you measure the CPU usage while the server
serves pages, the loading of php will be on each page instead of just sending
out the page. The more idle the CPU can be, the more environment friendly your
server will be.
--
//Aho
Navigation:
[Reply to this message]
|