|
Posted by Henrik Hansen on 03/22/06 16:53
Jerry Stuckle <jstucklex@attglobal.net> writes:
> Henrik Hansen wrote:
>> youcantoo <dwm@findmoore.net> writes:
>>
>>>Henrik Hansen wrote:
>>>
>>>>Badr.ALmuzini@gmail.com writes:
>>>>
>>>>
>>>>>hi,there
>>>>>
>>>>>how can i make php file extension hidden in the URL somthing like this
>>>>>(http://mail.google.com/mail/?view)
>>>>
>>>>If you do this the parameter ?view is appended the index.php file in
>>>>that dir, so it's quite easy, just make sure your index.php
>>>>understands ?view. Another way is to make .html (.htm) files to be
>>>>parsed as php, then you have index.html but you can actually use php
>>>>in the file.
>>>>
>>>
>>>That is not really a good idea as it puts a hugh load on the
>>>server. Now for EVERY .html page apache servers it will have to parse
>>>each .html page for php script, even if the page has no php script in
>>>it. This really increases the load on the server. It all translates to
>>>SLOWER pages. Is that what you really want to achieve?
>> Do you have any banchmarks for your claims? I use this way and can't
>> really see any difference at all to be honest. Parsing pages to see if
>> there is php in it goes VERY fast. Ofcource everything is relative but
>> in general I think it's a good way of masking files.
>> You could also just turn it on on the php folders if you have
>> seperate
>> static content folders, so they dont get treatet as php.
>>
>
> You obviously don't have a very heavily loaded server. You get one
> with a few thousand hits/minute and it's a definite hit. How much
> depends on the size of the HTML files, the percentage of PHP in the
> files and a bunch of other things.
>
> Why do you even care about masking the files, anyway?
The goal was to make the best looking urls which meant a .php
extension was out of the picture. But as I said everything is
relative.. our .htm files are purely php. If you mix php and html very
much maybe the performance cost is bigger. I have no numbers of how
much traffic it gets per second but I don't think it's a few
thousand.. although we did test with ab.
--
Henrik Hansen
Navigation:
[Reply to this message]
|