Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
1  
Only if you want to use MultiViews. See php.net/manual/… –  joschi Apr 10 '10 at 10:37
add comment

Your Answer

 
discard

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.