[users@httpd] Re: macosx alias

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

 



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@xxxxxxxxxx            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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux