• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Handling files by http server

MulliGan81

Junior Member
As i understand when the server (e.g. Apache) receives a request it looks for file name extension to find associated mime-type. Then it looks for the handler handling this mine-type (i'm stating it based off adding PHP support to Apache). And here are my questions:
  1. Is the above statement correct?
  2. If so when there is no handler for given mime-type does it mean the default behavior - that is just send a file to the client?
  3. If there is even no explicit extension - mime-type association defined (e.g. .html) the default action again is just send a file to the client?
  4. According to some sources to add PHP support to Apache we have to use
    addType directive: AddType application/x-httpd-php .php while others say to use addHandler directive: AddHandler application/x-httpd-php .php which in my opinion is the only correct because addType should be used only for static documents. So why the addType version is still correct?

  5. I found somewhere such a lines:
Code:
AddType text/html .php .phps 
AddHandler application/x-httpd-php .php 
AddHandler application/x-httpd-php-source .phps
Does it mean that AddType directive will be used if the server can't find the handler for application/x-httpd-php mime-type and the action would be just to send .php source file to the client with text/html mime-type in response?​
 
Back
Top