| ACADEMIC COMPUTING and COMMUNICATIONS CENTER | |||||||||
Redirecting Web Pages | ||
| ASIS files | ||
|
When HTML files are sent to a browser, the web server adds appropriate
HTTP headers.
But on tigger and icarus, if the web file ends with the extension Note that if you have been using index.html files with default urls, you can simply substitute index.asis with no change in the url. Here's an example asis file: Status: 302 Relocate status Location: http://www.new.place.com/new/ Content-type: text/html <HTML> <HEAD> <TITLE>New Home Page</TITLE> </HEAD> <BODY> <H1>We've Moved</h1> <A HREF="http://www.new.place.com/new/">New Page</A>. </BODY> </HTML>Notes:
|
||
| Form Submission / CGI script | ||
|
In this case, you'd like the user to submit a form, and the result of the submission will be to redirect the user to a new URL. This is useful if you have a long list of links that you'd prefer to put in a select box. Suppose you have a page like this: <a href="http://www.uic.edu/page1/">Goto page1</a> <a href="http://www.uic.edu/page2/">Goto page2</a> <a href="http://www.uic.edu/page3/">Goto page3</a> <a href="http://www.uic.edu/page4/">Goto page4</a> <a href="http://www.uic.edu/page5/">Goto page5</a> <a href="http://www.uic.edu/page6/">Goto page6</a> If the list is really long, you can substitute the following construct:
<form method=get action="http://www.uic.edu/htbin/location.pl">
Select new page:<br>
<select name=location size=3 >
<option value="http://www.uic.edu/page1/">Page 1
<option value="http://www.uic.edu/page2/">Page 2
<option value="http://www.uic.edu/page3/">Page 3
<option value="http://www.uic.edu/page4/">Page 4
<option value="http://www.uic.edu/page5/">Page 5
<option value="http://www.uic.edu/page6/">Page 6
</select>
<input type="submit" value="Go to Selection">
</form>
The use of this ought to be clear from the above example, if you know about HTML forms. Just make sure that:
|
||
| 2005-8-16 wwwtech@uic.edu |
|