Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

5. Wikis, Webs, and Blogs > Site Redirection

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial