You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chad Jones <ch...@yahoo.com> on 2008/04/06 00:10:19 UTC

[users@httpd] ForceType, AddType and/or AddModule?

I'm brand new to Apache and pretty confused.  I hope my question is a 
 simple one.  I'd really like to know the fundamental difference 
 between AddModule, AddType and ForceType.  I have read the Apache 
 documentation located here: 
 http://httpd.apache.org/docs/2.0/mod/mod_mime.html 
 However it isn't clear for example why I should choose one over the 
 other for configuration.  What's the difference?  Perhaps I'm so new 
 to Apache that I just really don't get it. 
 On some webpages I see directives like: 
 AddType application/x-httpd-php .php 
 
On others it is like this: 
 AddHandler php-script .php .htm .html 
 
Still other pages where the suggestion is to use both of the above. 
 Which of these is right?  I have also read on one page that AddType is 
 wrong and AddHandler is right but why?  Not only that but I think 
 AddType is using the MIME type application/x-httpd-php which I don't 
 think is even a valid mime type according to iana who I believe is the 
 authority on MIME types: 
 http://www.iana.org/assignments/media-types/ 
 
I also ran across another page from someone who seemed very 
 knowledgable on the subject who suggested to use ForceType if I want a 
 certain named file without an extension to be handled as PHP: 
 
<Files download> 
 ForceType application/x-httpd-php 
 </Files> 
 
I'd really like to know what the difference is here and why I should 
 pick one other the other?  I'm not someone who does the whole "try it 
 and if it works great" I'd rather configure Apache right the first 
 time rather then configure it now and then find out later its not 
 configured properly and have to go and fix it.  That is do it right 
 the first time... 
 
I apologize for all the questions, maybe you can tell I'm 
 confused.  :) 
 Chad. 
   
   
       
---------------------------------
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.