httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: Intra-server redirections in .htaccess
Date Wed, 18 Sep 1996 14:39:00 GMT
On 18 Sep 1996 15:18:37 +0200 in en.lists.apache-new-httpd you wrote:

> I'd like to be able to have redirections in .htaccess files which
> redirect within the server; e.g.

> Redirect /here/flob.html /there/lob.html

> without having to specify the http://.. bit.  The reason I want to do
> this is so I can use the same .htaccess files on different servers,,
> without all the redirections going to the same server.

> Is this possible?  I know I can do it with ErrorDocument but this would
> be a much preferred solution.

No, please don't start hacking an ErrorDocument as I did in the old days.
There is a much simpler solution: just use mod_rewrite and the following code
in the .htaccess file of /here:

    RewriteEngine on
    RewriteRule   ^flob\.html$  /there/lob.html 

This will do a internal redirect. Try it out...

                                        Ralf S. Engelschall    

View raw message