► |  | Web Server: PLT HTTP Server

1 | Running the Web Server
2 | Writing Servlets
3 | Extending the Web Server
4 | Troubleshooting and Tips
5 | Acknowledgements
| Index

► | 2 | Writing Servlets

2.1 | Defining a Servlet
2.2 | APIs
2.3 | Common Contracts
2.4 | HTTP
2.5 | Web Interaction
2.6 | Stateless Web Interaction
2.7 | Web Cells
2.8 | File Boxes
2.9 | Stateless Web Parameters
2.10 | Formlets
2.11 | Templates
2.12 | Continuation Managers

▼ | 2.4 | HTTP

2.4.1 | Requests
2.4.2 | Bindings
2.4.3 | Responses
2.4.4 | Redirect
2.4.5 | Basic Authentication

On this page:

redirect-to
redirection-status?
permanently
temporarily
see-other

Version: 4.1.4
top← prev up next →

##### 2.4.4`` Redirect

(require web-server/http/redirect)

(redirect-to |  | uri |  |  |  |
| [ | perm/temp |  |  |  |
|  | #:headers headers]) |  | → |  | response?

uri : string?
perm/temp : redirection-status? = temporarily
headers : (listof header?) = (list)

Generates an HTTP response that redirects the browser to uri, while including the headers in the response.

Example: (redirect-to "http://www.add-three-numbers.com" permanently)

(redirection-status? v) → boolean?
v : any/c

Determines if v is one of the following values.

permanently : redirection-status?

A redirection-status? for permanent redirections.

temporarily : redirection-status?

A redirection-status? for temporary redirections.

see-other : redirection-status?

A redirection-status? for "see-other" redirections.

top← prev up next →