Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'mod_alias should also work' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
mod_alias should also work
Authored by: Schwie on Feb 14, '04 12:50:34PM
From MacWorld:

Banish the Tilde from Users' Site Names

With OS X's built-in Personal Web Sharing (found in the Sharing preference pane), every user on your Mac can have a personal Web site that others can access at a URL such as http://your.ip.number/~user_name.

If you don't like having the tilde in the URL, however, you can easily remove it with Terminal and an admin password.

Open a Terminal window, and then type

cd /etc/httpd/users

to switch to the directory that Apache (the built-in Web server) uses to manage the user sites. If you're unsure of your users' short names, type ls to see a list of the available configuration files. Say you want to modify the settings for a user named Alice:
type sudo pico alice.conf
and enter your admin password when prompted to do so. Once the file is open, type the following above the first line (the one that begins with

Alias /alice "/Users/alice/Sites".

This Alias command acts just like an alias file in the Finder -- it tells Apache that someone looking for a page at the /alice URL should be sent to Alice's Sites folder instead.

Once you've added the line, press control-X to exit, and then press Y when pico asks if you'd like to save the modified buffer -- this will write your changes to the file.

Return to the Sharing preference pane, and turn the Personal Web Sharing feature off and then back on. This restarts Apache, which will then read the modified configuration. From now on, you can skip the tilde and just type http://your.ip.address/alice to get to Alice's Web site. Repeat this process for any other user URL you'd like to modify.



[ Reply to This | # ]