How do I redirect a request submitted to my Reverse Proxy?
search cancel

How do I redirect a request submitted to my Reverse Proxy?

book

Article ID: 166152

calendar_today

Updated On:

Products

ProxySG Software - SGOS

Issue/Introduction

I have an internal webserver and I want to grant public access to one or two URLs on that server, but deny anything else. Also, I'd like to rediect any partially incorrect requests to the correct URL.

For example, I would like to redirect http://mysite.com/mypath to https://mysite.com/mypath but deny access to https://mysite.com without a specified path.

Resolution

  1. Create two new Web Access Layers. As an example, Layer 1 is the Allow Layer and Layer 2 is the Redirect Layer. 
  2. Create rules on the Allow Layer to allow only HTTPS requests and only to the specific paths that you wish to allow, and then deny everything else to mysite.com.
    Note: You can create a Combined Source Object, and put all of those objects in there if you don't want multiple rules to be shown, since you're only configuring allow/deny.
    1. Set the Destination to be a Request URL object, and use the Advanced Match option.
    2. Set the Scheme to https.
    3. Set the Path to the path you'd like to allow, such as "/mypath" (Without the quotes)
    4. Click OK and then click OK again. 
  3. Put a rule below the rule you just created on the same layer that denies all other transactions, assuming you are not using a default policy of deny. 
  4. On the Redirect Layer, create Destination objects that look for exactly http://mysite.com/mypath and rewrites that to https://mysite.com/mypath.