### LiteSpeed Web Server Users' Manual

##### Version 5.0 Rev. 1

- License Std / Ent
- Introduction
- Installation
- Administration
  - Service Manager
- Security
- Configuration
  - Server General
  - Server Tuning
  - Server Security
  - Request Filter
  - Page Cache
  - External Apps
  - Fast CGI App
  - Fast CGI Authorizer
  - LSAPI App
  - Servlet Engine
  - Web Server
  - Pipped logger
  - Load Balancer
  - Script Handler
  - Rack/Rails Settings
  - Listeners
  - Templates
  - Virtual Host Basic
  - Virtual Host General
  - Virtual Host Security
  - Rewrite
  - Context
  - Static Context
  - Java Web App Context
  - Servlet Context
  - Fast CGI Context
  - LSAPI Context
  - Proxy Context
  - CGI Context
  - Load Balancer Context
  - Redirect Context
  - Rack/Rails Context
  - Web Socket Proxy
  - Add-ons
  - Admin Server
  - Admin Listeners

# Redirect Context

#### Table of Contents

Redirect Context
Description: A Redirect Context can be used to forward one URI or a group of URIs to another location. The destination URI can be either on the same web site (an internal redirect) or an absolute URI pointing to another web site (an external redirect).

URI
Description: Specifies the URI for this context.
Syntax: The URI can be a plain URI (starting with "/") or a Perl compatible regular expression URI (starting with "exp:"). If a plain URI ends with a "/", then this context will include all sub-URIs under this URI. If the context maps to a directory on the file system, a trailing "/" must be added.
See Also: Location

External Redirect
Description: Specifies whether this redirect is external. For external redirection, Status Code may be specified and Destination URI can start either with "/" or "http(s)://". For internal redirection, Destination URI must start with "/".

Status Code
Description: Specifies the response status code of the external redirection. If the status code is between 300 and 399, Destination URI can be specified.
Syntax: Select from drop down list

Destination URI
Description: Specifies the target location of the redirection. If this redirected URI maps to a URI in another redirect context, it will be redirected again.
Syntax: This URI can either be a relative URI on the same web site starting with "/", or an absolute URI pointing to different web site starting with "http(s)://". If the URI contains regular expression, the destination can reference the matched variables, such as $1 or $2.

Allow Override
Description: Specifies what directives in an access control file are allowed. An access control file can be placed in a directory to control the accessibility of files under that directory. When nothing is checked, inherited default settings will be used. When None is checked, access control files will be ignored. When Limit is checked, directives "Order", "Allow from" and "Deny from" are allowed. When Auth is checked, directives "AuthGroupFile", "AuthName", "AuthType", "AuthUserFile", and "Require" are allowed. When FileInfo is checked, directives "Satisfy", "AddDefaultCharset", "AddType", "DefaultType", "ForceType", "ExpiresActive", "ExpiresDefault", "ExpiresByType", "Redirect", "RedirectTemp", "RedirectPermanent", "RewriteEngine", "RewriteOptions", "RewriteBase", "RewriteCond" and "RewriteRule" are allowed When Indexes is checked, directive "DirectoryIndex" is allowed When Options is checked, directive "Options" is allowed Allow Override configuration is available at three levels: server, virtual host and context. If a configuration is not checked at the server level, the controlled directives will be disabled for the whole server whether or not it is enabled at lower levels. If something is enabled at the server level, virtual hosts will inherit same settings by default. Similarly context level settings will be inherited from virtual host settings. Lower levels can disable a setting that is enabled at an upper level, but cannot enable a setting that is disabled at an upper level.
Syntax: Select from checkbox
Tips: [Performance] If there is no need for directory level configuration customization, check None.

Realm
Description: Specifies the authorization realm for this context. When specified, a valid username and password must be provided in order to access this context. Authorization Realms are set up in the Virtual Host Security section. This setting uses each realm's Realm Name.
Syntax: Select from drop down list

Authentication Name
Description: Specifies an alternative name for the authorization realm for current context. If it is not specified, the original realm name will be used. The authentication name is displayed on the browser's login pop-up.

Require (Authorized Users/Groups)
Description: Specifies which user/group can access this context. This allows you to use one user/group database (specified in Realm) across a number of contexts, but only allow certain users/groups from that database to access this context.
Syntax: Syntax is compatible with Apache's Require directive. For example: user username [username ...] Only listed users can access this context; group groupid [groupid ...] Only users belonging to the listed groups can access this context. If this setting is not specified, all valid users will be able to access this resource.

Access Allowed
Description: Specifies which IPs or sub-networks are allowed to access resources under this context. Together with Access Denied and server/virtual host-level access control, accessibility is determined by the smallest scope that a client's IP address falls into.
Syntax: Comma-delimited list of IPs/sub-networks.
Example: Sub-networks can be written as 192.168.1.0/255.255.255.0, 192.168.1 or 192.168.1.*.

Access Denied
Description: Specifies which IPs or sub-networks are NOT allowed to access resources under this context. Together with Access Allowed and server/virtual host-level access control, accessibility is determined by the smallest scope that a client's IP address falls into.
Syntax: Comma-delimited list of IPs/sub-networks.
Example: Sub-networks can be written as 192.168.1.0/255.255.255.0, 192.168.1 or 192.168.1.*.

Authorizer
Description: Specifies an external application that can be used to generate authorized/unauthorized decisions. Currently, only the FastCGI Authorizer is available. For more details about the FastCGI Authorizer role, please visit http://www.fastcgi.com.
Syntax: Select from drop down list