Re: Content negotiation in Apache

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

 



On Sat, 27 Dec 2003 13:09:56 -0600
"Rodolfo J. Paiz" <rpaiz@xxxxxxxxxxxxxx> wrote:


> Note, however, that I am not searching for how to do this for the index 
> page... that works already and works well. What I'd like is to have my 
> "news" page, and have Apache search for news.php, news.html, or news.txt
> (in that order) and serve up the first one it finds.

Someone already mentioned the rewriting rules which will work for you. 
Here is an example you can add to your httpd.conf:

RewriteEngine On
RewriteRule     (.*)\.html$      $1\.php         [NC]


This will rewrite all URL's ending in html to php.   The [NC] trailling
parameter says to ignore case so ".HTML", ".hTmL" etc will be rewritten
as well.

Cheers,
Sean


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