Strip username from each url: redirects or aliases?

Giganews Newsgroups
Subject: Strip username from each url: redirects or aliases?
Posted by:  Rahul (nospam@nospam.invalid)
Date: Wed, 8 Jul 2009

I was wondering if there was any way under Apache to take care of the
following situation:

I installed mediawiki under my home: ~foouser/public_html/wiki
Then I made a soft link in /var/www/html like so:

wiki -> /home/foouser/public_html/wiki/

This works great and the wiki can be accessed by pointing a browser to:

http://hostaddress/wiki/

Unfortunately, after that each page link is transformed  to:

http://hostaddress/~foouser/wiki/

etc.

This has the annoying effect of exposing my username "foouser" to the links
unnecessarily. I know that this is my fault since I installed MediaWiki
under my home but is there any apache trick that can allow me to morph each
link to prevent exposing the "foouser" part to the users?

I have tested that with MediaWiki generated links any removal of the
~foouser part leads to a successful page redirect with the ~foouser part
being automagically inserted in there. Maybe a redirect or alias?

Or will this have to be fixed at MediaWiki level?

--
Rahul

Replies