Go to the table of contents Go to the previous page Go to the next page View or print as PDF
Configuration Files > remap.config
remap.config
Help | Content Gateway | Version 8.1.x
The remap.config file contains mapping rules that Websense Content Gateway uses to redirect HTTP requests permanently or temporarily without Content Gateway having to contact any origin server:
 
Important 
After you modify this file, restart the proxy or run content_line -x from the Content Gateway bin directory (/opt/WCG/bin) to apply the changes. When you apply the changes to a node in a cluster, Content Gateway applies the changes to all nodes in the cluster.
Format
Each line in the remap.config file must contain a mapping rule. Content Gateway recognizes three space-delimited fields: type, target, and replacement. The following table describes the format of each field.
 
*
map provides the same function as redirect. Use of redirect is recommended.
*
redirect—redirects HTTP requests permanently without having to contact the origin server. Permanent redirects notify the browser of the URL change (by returning an HTTP status code 301) so that the browser can update bookmarks.
*
redirect_temporary—redirects HTTP requests temporarily without having to contact the origin server. Temporary redirects notify the browser of the URL change for the current request only (by returning an HTTP status code 307).
Note: reverse_map is not supported.
Enter the origin or from URL. You can enter up to four components:
scheme can be http, https, or ftp.
Enable Match URL Exactly to force matching to be exact against the entire requested URL.
Without this option, the URL is compared up to the end of the target (From Path Prefix). If there is a match, the redirect is applied. This can cause unwanted matching, when the redirect URL includes the base URL. See Mapping and Redirection.
Enter the destination or to URL. You can enter up to four components:
scheme can be http, https, or ftp.
 
Note 
Examples
The following section shows example mapping rules in the remap.config file.
Redirect mapping rules
The following rule permanently redirects all HTTP requests for www.company.com to www.company2.com:
redirect http://www.company.com http://www.company2.com
The following rule temporarily redirects all HTTP requests for www.company1.com to www.company2.com:
redirect_temporary http://www.company1.com http://www.company2.com

Go to the table of contents Go to the previous page Go to the next page View or print as PDF
Configuration Files > remap.config
Copyright 2016 Forcepoint LLC. All rights reserved.