как я поддерживаю подмененный URL на сессии прокси?

Выключите его в vmtools.

1
задан 20 December 2012 в 22:58
1 ответ

To masquerade the domain, you would use the below rules.

ProxyPass /support http://company.custhelp.com
ProxyPassReverse /support http://company.custhelp.com

Any URI links on the remote site would need to be relative, so that, when clicked, they remain inherently relative to your domain. For example:

<a href="faq.html">

vs.

<a href="http://company.custhelp.com/faq.html">

If for some reason you have no control over the content of the remote site (I don't see why you wouldn't), there is no Apache module that parses pages. You would need to create a script that serves those requests from your server. The script would act as the proxy: fetching the pages from the remote site, parsing the content and rewriting the HTML (URIs) before returning it to the end-user.

There are a handful of challenges that arise when creating this type of script. A couple that come to mind are images and css files. You will need to decide if you will handle serving the images through your site or make the script such that it doesn't rewite image URLs. If the image references are relative, you will need to serve them or make the script such that it rewrites those relative paths with the remote source domain. You will have similar issue with css files. Another is "HTTP_REFERER" rules. While rare, if the remote site has any "HTTP_REFERER" rules, those items won't work.

It certainly is not impossible, but you will need to account for many possibilities.

0
ответ дан 4 December 2019 в 09:28

Теги

Похожие вопросы