httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@en.muc.de>
Subject Re: WWW Form Bug Report: "Using Redirect and Alias" on Linux (fwd)
Date Tue, 20 Aug 1996 07:45:08 GMT
> > I would like to have the following in my config
> > files:
> > 
> > Redirect /local/archive http://www.loran.com/local/archive/
> > Alias /local/archive/ /home/www/archive/
> > 
> > The attempt here is to allow people to type
> > http://www.loran.com/local/archive and have it
> > redirected to http://www.loran.com/local/archive/
> > (currently you get a 404 not found error, and
> > users don't understand why)
> > 
> > This doesn't work because 
> > http://www.loran.com/local/archive/ matches
> > the Redirect line and you get requests with 
> > more and more slashes:
> > 
> >      GET http://www.loran.com/local/archive////////  HTTP/1.0
> > 
> > What is need is a way to redirect a single URL
> > rather than a pattern match.

Just use my mod_rewrite (http://www.engelschall.com/sw/mod_rewrite/) and use
the following in your config file:

    RewriteEngine On
    RewriteRule   ^/local/archive$     /local/archive/      [R]
    RewriteRule   ^/local/archive/(.*) /home/www/archive/$1

This will do the trick...

Greetings,
                                        Ralf S. Engelschall    
                                        rse@engelschall.com
                                        http://www.engelschall.com/~rse

Mime
View raw message