You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert T Wyatt <ro...@mail.utexas.edu> on 2006/11/17 23:21:09 UTC

[users@httpd] Re: macosx alias

Sander Temme wrote:
> 
> 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

Wow, that was easy...! (Yes, I have admin privileges on this box.)

I had been messing around with a 403 response, but this worked like a charm.

Thanks!
Robert


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: macosx alias

Posted by Sander Temme <sc...@apache.org>.
On Nov 17, 2006, at 2:21 PM, Robert T Wyatt wrote:

> I had been messing around with a 403 response, but this worked like  
> a charm.

403 is Forbidden, and for the browser the buck usually stops right  
there. A Redirect it will follow unbeknownst to the user.

S.

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