Serve user sites without the tilde in the URL

Oct 28, '02 09:35:42AM

Contributed by: ynolo

I have several users on one of my 10.2 boxes. They all want to publish their web pages, but don't like the idea of having to type http://mydomain.com/~user/. So what I did was create a symbolic link from their Sites folder to the web root, /Library/WebServer/Documents/.

I name the symbolic link as their short user name. When they want to access their personal web site, they only have to type http://mydomain.com/user/. For those of you wanting to know how to make the link, just open a Terminal and type:

 % ln -s /Users/username/Sites  /Library/WebServer/Documents/username
Replace 'username' with the user's short user name, obviously. That's all you need to do; the users can now access their sites without typing the tilde. My users like it, so I thought maybe one of you may find it useful.

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20021028063542212