httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Temme <scte...@apache.org>
Subject Re: [users@httpd] macosx alias
Date Fri, 17 Nov 2006 21:59:04 GMT

On Nov 17, 2006, at 1:05 PM, Robert T Wyatt wrote:

> Hi folks,
>
> I'm using Apache 1.3.33 (built-in) on MacOS 10.4.8. My LAN  
> administrator changed my user name and so there are some old links  
> on the net that I'd like to catch and redirect to the new user's site.
>
> For instance, I would like for requests to
> http://reg066.reg.utexas.edu/~rgrtw/fink/installed.txt
>
> be redirected to
> http://reg066.reg.utexas.edu/~rgrtw-05/fink/installed.txt.
>
> I have found that using:
>     Alias /fink/ "/Users/rgrtw-05/Sites/fink/"
>     Alias /fink "/Users/rgrtw-05/Sites/fink"
> will work for
> http://reg066.reg.utexas.edu/fink/installed.txt
> but not for the old user name.
>
> Old user name: rgrtw
> new user name: rgrtw-05
>
> If I could solve the problem for the specific case above, I would  
> be quite happy. That is, I don't need a general solution, but if  
> you have one, by all means please share it.

Is this your own box and do you have write access to /etc/httpd/ 
httpd.conf? You could add:

Redirect permanent /~rgrtw http://reg066.reg.utexas.edu/~rgrtw-05

to the end of the file and restart your Apache server.

The Redirect permanent instructs clueful clients to forget the old  
URL and use the new one from now on.

Note that if/when Apple decides to update Apache through Software  
Update, it'll move your edited config aside and install a new one:  
the redirect will disappear.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Mime
View raw message