Content negotiation in Apache

From: Robert Brown (eli_at_typhoon.xnet.com)
Date: 12/27/03

  • Next message: Jean-Louis Noel: "2.4.20-27.9 and ipv6"
    To: redhat-list@redhat.com
    Date: Sat, 27 Dec 2003 01:15:32 -0600 (CST)
    
    

    Rodolfo J. Paiz writes:
    > Hey, all:
    >
    > I've been reading the docs for Apache 1.3.x trying to understand content
    > negotiation, and while I think I'm starting to get the picture I'm not
    > altogether clear. Can someone offer a quick hint to getting this working?
    >
    > I am switching all ".html" files on my website to ".php" but I now realize
    > that I will need a bunch of "Permanent Redirect" calls so as not to break
    > links and search engines. And, should I ever choose to change a suffix I
    > will have the same problem, which is why content negotiation sounds so
    > nice. All I want is for Apache to see a URI like
    > "http://domain.com/sendmail-howto" and serve up sendmail-howto.php if it
    > exists, or sendmail-howto.html if the .php file does not exist. That way my
    > URI's will be shorter, easier to remember for users, and less prone to
    > breakage later if/when I have to change something.
    >
    > Pointers and hints most welcome!

    As I understand it, http://domain.com/sendmail-howto should resolve
    first to http://domain.com/sendmail-howto/index.>, where suffix
    is usually html, or shtml, or php, or whatever. I believe the order
    of attempting a match is determined by the order the suffixes are
    declares in the config file, but I'm no expert -- just a voice in the
    middle of the night. :-)

    I am not aware of any way to get apache to try to tack a suffix onto
    the name, only a filename onto the path.

    -- 
    --------  "And there came a writing to him from Elijah"  [2Ch 21:12]  --------
    R. J. Brown III  rj@elilabs.com http://www.elilabs.com/~rj  voice 859 567-7311
    Elijah Laboratories Inc.    P. O. Box 166, Warsaw KY 41095    fax 859 567-7311
    -----  M o d e l i n g   t h e   M e t h o d s   o f   t h e   M i n d  ------
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Jean-Louis Noel: "2.4.20-27.9 and ipv6"

    Relevant Pages

    • Re: Generated javascript from .pl files
      ... Bart Van der Donck wrote: ... suffix; in fact, it is recommended not to do so; use content negotiation ...
      (comp.lang.javascript)
    • Content negotiation in Apache
      ... I've been reading the docs for Apache 1.3.x trying to understand content ... negotiation, and while I think I'm starting to get the picture I'm not ... Can someone offer a quick hint to getting this working? ...
      (RedHat)
    • RE: ports & package names changing?
      ... Yes, but doing it that way as example, entering 'apache' would ... > versions suffix appended. ... > believe is the correct name as instructed by the FBSD handbook. ...
      (freebsd-questions)
    • Re: should i write keywords uppercase?
      ... > Add a suffix to the names of all quantites that have physical ... > dimensions. ... That is a very good hint. ...
      (comp.lang.fortran)