Host replace for proxy configuration

Hi, I need to replace the host from the backend server to the front on a proxy server configuration.

I am using a basic rule

RewriteRule (.*) http://192.168.120.47:80/$1 [p]

in the web ReWrite rule web gui of the LSWS

but I am getting a 500 Internal Error

what is the rule missing? My guess is that this rule is making a redirection to the same host causing a loop. But how do I replace the HTML ahref on demand so user see the proxy host and not the backend host.

Tks for the pointer NiteWave but my proxy and cache works perfect (based on that same article), the problem is the links. They are preserved as the backed are. I need them to change to my proxy domain (in y case ip) so the user can navegate via the proxy. I would asume a ReWrite Rule is needed unless the proxy type in the Context makes that in automatic and I am missing a setting.

Everthing works well when I first use as client the Front End VH. But the links on the webpage do not get rewrite, they have the Back End URL. They should have the Front Ends so they can keep on the proxy while navigating.

I use to have this in IIS where a third party api would rewirte and change all links on the webpage to the given host so we could "hide" or protect the application server.

the rewrite/proxy has been working for long, and I've done many tests on this function in the past. I'd share more experience after you've got it working, for example, how to get it working with cache in rewriterule.

please check if you've defined proxy context at the same time.
if so, best to delete them to reduce conflict. forgot to ask, if the virtual host defined in lsws admin console(i.e., native vhost) or come from apache's httpd.conf ?

the rewrite/proxy has been working for long, and I've done many tests on this function in the past. I'd share more experience after you've got it working, for example, how to get it working with cache in rewriterule.

please check if you've defined proxy context at the same time.
if so, best to delete them to reduce conflict. forgot to ask, if the virtual host defined in lsws admin console(i.e., native vhost) or come from apache's httpd.conf ?

Click to expand...

Hi Nite, if I defined the context at the same time as what? or where else?

Virtual Host was created in the admin console. Does not come from apache.