Modular Software - Home PicLan-IP - Home

Redirecting Web Requests

One HTTP technique that can be used is the HTTP redirect operation. An HTTP redirect is a response page from a web server that directs the client's browser to another web page or web site.  This allows you to create psuedo web pages that actually cause the user to link to another page or site.  You can also use this technique within the mv/WEB PLZ application environment to handle exits and other branches out of applications.

How Redirects Work

An HTTP redirect operates by returning a web page to the client's browser with an HTTP error code set and with an extra header field in the returned HTTP header.  The error code that should be set is:
302 MOVED TEMPORARILY
The extra HTTP header field that should be added is:
Location: http://piclan.com
Of course, you can specify any valid URL that you wish.

Using Redirects from Active Server Pages

If you wish to use a redirect from within an active server page, you should include the following mv/BASIC code in your page's logic:
...
R.ERR = '302 MOVED TEMPORARILY'
PL_ADD_HDR 'Location: http://piclan.com'
RETURN

Using Redirects from mv/WEB Applications

You can use a redirect from within an mv/WEB application in exactly the same manner:
...
R.ERR = '302 MOVED TEMPORARILY'
PL_ADD_HDR 'Location: http://piclan.com'
RETURN
Modular Software - Home PicLan-IP - Home
© Copyright 1996-1998  Modular Software Corporation.All rights Reserved.