Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to redirect my university webpage with an .htaccess file:

Redirect 301 /~foo/

However, instead of taking me to , it appends the ~foo so that it redirects to

How does one make it to redirect to only

PS: Actually, I believe by default it redirects to , maybe there is a setting our admin has changed, and I need to revert it?

I have also tried other combinations like:

Redirect 301 /

Redirect 301 /~foo

but they all redirect to

share|improve this question
Use wget -S to see what's actually being thrown back at you. – Ignacio Vazquez-Abrams Jul 27 '10 at 22:03
It looks like this is related to the UserDir setting in Apache. – ustun Jul 27 '10 at 22:03
Redirect 301 /~foo works actually, there was some problem with caching. Make sure you try this in a new browser if the redirection doesn't work. – ustun Mar 10 '11 at 12:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.