Pages

11/09/2009

Website Redirection

I seem to be looking this up every time. Say I have a website with an app in a subfolder. I want to redirect to website/appfolder/default.htm so I don't make the user type https://website/appfolder.
Take this and save it to default.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>TITLE</title>
<meta http-equiv="REFRESH" content="0;url=https://info.domain.com/reaction"></HEAD>
<BODY>
Please wait while you are being redirected.
Click<a href="https://website/appfolder">here</a> to go there immediately.
</BODY>
</HTML>

If you want to redirect from unsecure (http) url to a secure (https) url then it is necessary to customize the 403.4 error message text to be the HTML code above.
Do this for IIS by replacing C:\WINDOWS\help\iisHelp\common\401-4.htm with above.
You can revert to the default anytime:
  • right-click the website and choose properties
  • Click Custom Errors tab
  • Click on the 401;4 entry and hit "Set to Default"

  • No comments: