wiki.getshifting.com

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


apacheredirect

Apache Redirect

Summary: On this page I'll show you a redirect which can be used in a apache webserver.
Date: Around 2009
Refactor: 27 December 2024: Checked links and formatting. This is really old. If you're really looking for something like this contact me and I'll make you something. Please don't use this anymore.

This is a HTML redirect script. Replace '/gw/webacc' two times with where you want your web server to redirect and you're done. If your webserver listens to both http and https it will work for both protocols.

<html>
   <!-- This is all just a super-duper redirect to the Welcome page
        If the user has Javascript 1.1 installed, they don't get their history
        messed up.  Otherwise, it behaves like a normal redirect, and even has
        fallbacks to non JS and browsers that don't handle the meta refresh tag
     -->
   <head>
      <script language="JavaScript">
         <!--
         var sThisURL = unescape('/gw/webacc');
 
         function doRedirect()
         {
            actualRedirect();
         }
 
         function actualRedirect()
         {
            setTimeout( "top.location.href = sThisURL", 500 );
         }
         //-->
      </script>
      <script language="JavaScript1.1">
         <!--
         function actualRedirect()
         {
            // this is a better way to do it if we have JS 1.1, not adding
            // to the browser's history
            top.location.replace( sThisURL );
         }
 
         if ( "MSIE" == navigator.appName )
         doRedirect();
 
         //-->
      </script>
   </head>
   <meta http-equiv="refresh" content="1;url=/gw/webacc" target="top">
 
   <body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" onLoad="doRedirect()">
   </body>
</html>

The redirect here is the redirect used for the login page for groupwise 7. For groupwise 6.5 it would be '/servlet/webacc'.

apacheredirect.txt · Last modified: by 127.0.0.1