Site Redirection

Redirection is taking traffic for a given website and redirecting that traffic to another. In this example, we’ll place this index page in the web directory for on an OS X Lion server. The server runs a site for already and so this page is simply meant to redirect users to the https version of the site:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TITLE> Secure Redirect</title>
<meta http-equiv="REFRESH"
You will now be redirected to

Above, we create an HTML tag, a heading tag, a title tag, and finally the meta http-equiv refresh. The content used between the body tag is simply to inform a user who might happen to see this site what is happening. Simply copy this into an HTML file and you’re off to the races. If using OS X Server, you can drop into /Library/WebServer/Documents by default to redirect users elsewhere.

Get Using Mac OS X Lion Server now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.