Using UAG as a static redirector is a major overkill, but occasionally, it makes better sense to use an existing server than build a special box just for a redirect. While IIS has a simple option to setup a redirector, making such configuration changes on the IIS on a UAG server is unsupported. In order to setup a redirect, you have to customize UAG a little, and there are two ways to do so.
First option: redirect using a custom login page.
The login page is the 1st customizable page that is loaded upon a user visiting a trunk. By creating a custom login page, you can perform a redirect on it. To do so:
1. Create a custom login page to do the redirect. The redirect can be done using the response.redirect ASP command, or using a client-side meta-refresh. This would like one of the below options:
<% Response.redirect “http://www.targeturl.com” %>
<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.targeturl.com/">
2. Save your custom file in <UAG path>/von/internalsite/CustomUpdate
3. On your trunk, go to Advanced Trunk configuration
4. Switch to the Authentication tab
5. Adjust the path of the logon page to point to your custom file:
6. Optionally, switch to the Session tab and DISABLE component installation and activation.
7. Click OK, and activate the configuration.
Second option: redirect using a custom portal page.
This method is based on setting the trunk to be unauthenticated (anonymous), and creating a custom portal home page to do the redirect. To use this:
1. Open the trunk’s advanced Trunk Config
2. In the Authentication tab, set the trunk to be unauthenticated (uncheck the “require users to authenticate”)
3. Optionally, switch to the Session tab and DISABLE component installation and activation.
4. Click OK.
5. Open the folder <UAG Path>\von\portalhomepage\CustomUpdate
6. Create a file named “<trunk name><0 or 1>default.aspx” there. Use 1 if this is an HTTPS trunk, and 0 if it’s an HTTP trunk.
7. In that file, create the code to do the redirect. As in option 1, you can use ASP or HTML. However, the file has to have the RUNAT code in it (otherwise, the .Net framework will produce an error).
<head runat="server"> </head> <% Response.redirect “http://www.targeturl.com” %>
<head runat="server"> </head> <META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.targeturl.com/">
8. Activate the configuration.
Works great! Thanks!