---
name: "wnredir"
section: "3"
platform: "linux"
package: "wn"
version: "2.2.9-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://carta.tech/man/wnredir"
---

# wnredir(3)

CGI program for redirecting to a new URL for wn HTTP server

## NAME

wnredir - CGI program for redirecting to a new URL for wn HTTP server

## SYNOPSIS

**wnredir** *url* \[ **/**\]

## DESCRIPTION

**wnredir** is a [**perl**(1)](/man/perl/1.md) CGI program that is part of the [**wn**(1)](/man/wn/1.md) HTTP server package.  It redirects requests for a file to another location.  It looks for the name of a URL in the *url* argument.  If it ends in an optional **/**, it concatenates the name of the file in the environment variable **WN\_KEY** (see **http:/doc/wn/appendixD.html**). It prints the resulting URL to **wnredir** standard output.

**wnredir** is intended to be used with the Databse Module feature of [**wn**(1)](/man/wn/1.md) (see **http:/doc/wn/module.html**). This requires that the **Cache-Module** directive be set in the appropriate *index* file (see **http:/doc/wn/appendixB.html**).\
  For example, to redirect all requests to *url* you would include the following line in the *index* file for the directory being redirected:

```
        Cache-Module=redir url
```

## SEE ALSO

[**wn**(1)](/man/wn/1.md), [**wn\_mkdigest**(1)](/man/wn_mkdigest/1.md), [**wn\_uncache**(1)](/man/wn_uncache/1.md), [**wndex**(1)](/man/wndex/1.md), [**wnindexmaker**(1)](/man/wnindexmaker/1.md), [**wnpnuts**(1)](/man/wnpnuts/1.md), [**wnauth**(3)](/man/wnauth/3.md), [**wncat**(3)](/man/wncat/3.md), [**wnhtmlify**(3)](/man/wnhtmlify/3.md), [**wnsectsearch**(3)](/man/wnsectsearch/3.md), [**wnseven\_m**(3)](/man/wnseven_m/3.md), [**wn\_md5passwd**(8)](/man/wn_md5passwd/8.md), [**wn\_mkpasswd**(8)](/man/wn_mkpasswd/8.md), [**wnconfig**(8)](/man/wnconfig/8.md), [**wnd**(8)](/man/wnd/8.md), [**wnsd**(8)](/man/wnsd/8.md), [**wnupdatewww**(8)](/man/wnupdatewww/8.md), [**wnv2c**(8)](/man/wnv2c/8.md)\
 **http:/doc/wn/module.html**\
 **http:/doc/wn/appendixB.html**\
 **http:/doc/wn/appendixD.html**\
 **http:/doc/wn/manual.html**\
 **http://hopf.math.nwu.edu/**

## AUTHOR

**wn** is written by John Franks \<john@math.nwu.edu\>.  Modified by Jean Pierre LeJacq \<jplejacq@quoininc.com\> as part of packaging for the Debian GNU/Linux distribution. Manual page also added by Jean Pierre LeJacq.
