Content negotiation in Apache

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

 



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.<suffix>, 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@xxxxxxxxxxx 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@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux