cancel
Showing results for 
Search instead for 
Did you mean: 
wg454hh
Level 7

Is Web gateway capable of performing link translation and how

Hello


I couldn`t find a way to use web gateway to translate external to internal URLs.


I have a reverse proxy, and presently it is working that anything “example.com” is translated to “internal.server”
EG:
test.example.com/somefolder/somefile = internal.server/somefolder/somefile

is it possible to use the web gateway to do this:

www.something.example.com= internal.server/something

Any help appreciated.


Meg

0 Kudos
5 Replies
asabban
Level 17

Re: Is Web gateway capable of performing link translation and how

Hello,

you can set the "URL" property to any value you want during Request cycle. When the rule engine finishes the request cycle MWG will talk to whatever URL is set to. Since your reverse proxy setup is already running I assume you probably have already done something similar.

For the example you mentioned you can do something like

If

URL.Host equals www.something.example.com

Then

Set URL.Host to internal.server

Set URL.Path to /something

But I assume it won't be that easy as there may be a path on the source request, such as

www.something.example.com/images/mypicture.jpg

In this case you would probably need to rewrite to something like

internal.server/something/images/mypicture.jpg

This can also be done if you use a user-defined property and set the path correctly, e.g.

If URL.Host equals www.something.example.com

Then

Set User-Defined.MyPath to URL.Path

Set URL.Host to internal.server

Set URL.Path to /something/ + User-Defined.MyPath

Best,

Andre

0 Kudos
wg454hh
Level 7

Re: Is Web gateway capable of performing link translation and how

Thanks a lot for your reply, Andre.

I will give it a try.

Regards,

Meg

0 Kudos
pbrickey
Level 11

Re: Is Web gateway capable of performing link translation and how

Check the reverse proxy doc located here: https://community.mcafee.com/docs/DOC-5205

-Patrick

0 Kudos
wg454hh
Level 7

Re: Is Web gateway capable of performing link translation and how

Thank you for the input.

Can anyone tell me why is a stop rule set action used instead of redirect?

I am talking about the above link > section https/http example

Meg

0 Kudos
pbrickey
Level 11

Re: Is Web gateway capable of performing link translation and how

Hi Meg,

It's because the rule set is not designed to re-direct - it's using the Next Hop Proxy feature to fetch the data. With a reverse proxy, you don't want to "redirect" the user to the resource, you want the proxy to proxy the data. By using a 'Stop Rule Set' action you allow for additional rules to be added below that rule that would apply to additional internal resources / sites.

-Patrick

0 Kudos