Rewrite Rules for Home Web Server

Discussion in 'Mac OS X Server, Xserve, and Networking' started by digisavvy, Oct 4, 2011.

  1. digisavvy macrumors newbie

    Joined:
    Oct 3, 2011
    #1
    Hello all,
    So I've got a home web server (mac mini, running Lion Server 10.7) and I've ensured apache/mysql/php/phpmyadmin are all installed and playing nicely.

    Right now, to see a site, I have to navigate to this structure of URL: http://domain-name.ext/~username/website

    That's okay, but I would like to make the URLs rewrite to http://domain-name.ext/website. The username will always be the same, so if I could make a rule that some how removes 'username' from the URL string that would be awesome.

    What's the best way to achieve that? Is this a rewrite rule to be done in httpd.conf or .htaccess? Or is this some other apache config?
     
  2. Hansr macrumors 6502a

    Joined:
    Apr 1, 2007
    #2
    Google apache conf vhost and set the locations accordingly.
     
  3. DustinT macrumors 68000

    DustinT

    Joined:
    Feb 26, 2011
    #3
    This is the kind of stuff I like to be able to ask my webhost.. I'm such a lazy guy!
     
  4. digisavvy thread starter macrumors newbie

    Joined:
    Oct 3, 2011
    #4
    Hehe. Well, I guess I can't do that since I'm my own webhost... Though, I think you just gave me a good idea.
     

Share This Page