Redirect

Redirect

Overview

Create policies to redirect requests for a URL to another URL.
You may create redirection policies that intelligently fetch response from a desired URL, and serve it to the client.
Alternatively, you may create policies that respond with a HTTP 302 redirection that instructs the client to seek your suggested URL.

Access the SafeSquid User Interface

Go to Configure Page

Google Safe search1.png     

Go to Real time content Security

Google Safe search4.png

Go to Redirect Section

Google Safe search5.png

Global

Enabled

Enable or Disable URL Redirection.
TRUE: Enable URL redirection.
FALSE: Disable URL redirection.
Google Safe search6.png
Google Safe search7.png
Google Safe search8.png
Google Safe search9.png

Redirection policies 

Google Safe search10.png    

Check Default entry in Redirection Policies

Google Safe search11.png

Add new policy (if you want to create new policy click on add button)

Redirect-policies.jpg
Create Entries to setup your URL Redirection Policies.
First entry applicable for a connection is used, skipping the rest.
Disabled Entries are ignored.

Enabled

Enable or Disable this entry
TRUE: Enable this entry.
FALSE: Disable this entry.

Comment

For documentation, and future references, explain the relevance of this entry with your policies.
That is, by reading the policies, a future user can understand the purpose of that entry.

Profiles

Specify the Profiles applicable for this entry.
This entry will be applicable only if the connection has any one of the specified profiles.
Leave it Blank, to apply for all connections irrespective of any applied profile
To avoid application to a connection that has a profile, use negated profile (!profile).

URL

Specify the requests to redirect.
This should be a valid PCRE (Perl Compatible Regular Expression).
Redirection occurs only if the requested URL matches this PCRE.
A typical URL is in the form "protocol://host/file".

Redirect

Specify the URL to redirect the request to.
A typical URL is in the form "protocol://host/file".
If left blank, the request will neither be redirected to any URL nor be connected to the requested URL, thus leaving the request never served.

Port

Specify the port to redirect the request to.
If left blank, the request will be redirected to the port available in the original request.

302 Redirect

If yes, a 302 redirect is issued; otherwise the new host is connected directly and the new file is requested.
A 302 redirect should always be used when possible to ensure relative links and images are correct.
TRUE: Enable 302 redirect.
FALSE: Disable 302 redirect.

Options

Several options are available to control how the URL should be handled.
ENCODE: Encode the new URL.
DECODEBEFORE: Decode the URL before attempting to match it with the regular expression.
DECODEAFTER: Decode the new URL after matching.

Applies to

Specify whether the URL to be redirected is the actual request from the user or part of the Location header returned by the requested site.
URL: Redirect if the URL is part of the actual request.
LOCATION: Redirect if the URL is part of the location header.
BOTH: Redirect if the URL is part of either actual request or Location header.

Example

Rule#1

I want to redirect request to https://www.google.com to https://www.wired.com.uk/article/gaming-google-crowdwork I want 302 redirect code when the redirect is successful.
Slide1-redirect.png


    • Related Articles

    • WCCP

      Overview Use WCCP routers to enforce transparent proxy. Stop setting proxy in client browsers and transparently redirect traffic flows in real-time. Global Enabled Enable or Disable this section. TRUE: Enable transparent redirection. FALSE: Disable ...
    • ICAP

      What is the advantage of using ICAP? ICAP is a protocol designed to off-load specific Internet-based content to dedicated servers, thereby freeing up resources and standardizing the way in which features are implemented. For example, a server that ...
    • Access restrictions

      Overview Use Access Restriction to Allow/Deny access to SafeSquid's service for specific users/user groups. This allows you to specify the Access rights for various users and profile them into user groups for unique processing in other sections. In ...