Fwd: ForceType, AddType and/or AddHandler?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I posted this earlier and never received a response.  I'm was hoping if I post it again I might have better luck. :)
Thank You.
Chad.

Chad Jones <chadsspameateremail@xxxxxxxxx> wrote:

    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 AddHandler, 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. 
    Thanks. :)
    Chad.


You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux