Redirect URL using Mac OS X Server Lion

Posted by pheedsta on Server Fault See other posts from Server Fault or by pheedsta
Published on 2012-04-19T22:29:28Z Indexed on 2012/11/11 5:04 UTC
Read the original article Hit count: 513

Filed under:
|
|

I have just set up a Mac Mini with OS X Lion Server to host my own website. I have registered multiple domain names, but I would like the user to be automatically redirected to my main domain name if they type in one of the others (i.e. if the user types in www.myotherdomain.com the URL will be forwarded instantly to www.mymaindomain.com). In the Web settings of Server.app, you can easily add additional domains (which works) but it does not change the URL in the browser to www.mymaindomain.com. It keeps www.myotherdomain.com whilst still displaying the correct pages.

Does the redirects or alias options do what I want? I can't seem to work out how to use them (there seems to be no documentation that I can find).

In Redirects, you need to enter:

  1. 'Redirect Type' (Exact Match or Regular Expression)
  2. 'Redirect Path'
  3. 'Destination URL'
  4. 'Redirect Status' (Original was permanently moved, etc)

In Alias, you need to enter:

  1. 'Alias Type' (Exact Match or Regular Expression)
  2. 'Alias Path'
  3. 'Destination Folder'

Any help would be great.

© Server Fault or respective owner

Related posts about macosx

Related posts about redirect