Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My understanding is

AddHandler - for server AddType - for client (browser)

AddType application/x-httpd-php4 .php4
AddHandler application/x-httpd-php4 .php4

But why do we need to add both ? Is both needed in case of PHP ? Is AddType needed for PHP ?

share|improve this question
up vote 4 down vote accepted
  • AddType: Maps the given filename extensions onto the specified content type
  • AddHandler: Maps the filename extensions to the specified handler

In your case it is just coincidence that the content type is equal to the name of the handler - given that there actually is a handler named application/x-httpd-php4. Otherwise it's just plain wrong.

share|improve this answer
But is AddType needed for PHP ? – nitins Apr 10 '10 at 9:18
Only if you want to use MultiViews. See… – joschi Apr 10 '10 at 10:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.