O'Reilly logo

Using Mac OS X Lion Server by Charles Edge

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 http://www.krypted.com on an OS X Lion server. The server runs a site for https://www.krypted.com 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">
<HTML>
<HEAD> 
<TITLE>krypted.com Secure Redirect</title>
<meta http-equiv="REFRESH"
content="0;url=https://www.krypted.com"> 
</HEAD> 
<BODY> 
You will now be redirected to https://www.krypted.com
</BODY> 
</HTML>

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required