httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] help with mod_proxy_html, trouble rewriting javascript content
Date Mon, 09 Mar 2009 07:45:51 GMT
On Fri, Mar 6, 2009 at 3:14 PM, Arne Berner <aberner@practical.no> wrote:
> Hi,
>
> I have a  Apache/2.2.8 running as a reverse proxy in front of a .Net
> application using Ajax and the gaia framework (gaiaware.net)
> I have setup several ProxyHTMLURLMap for to rewrite the responses from
> the application, and this works great for html content and javascript
> embeded in the html.
> But not for HTTPResponses with javascript only.

Generally my approach to solve such problems is to look at the backend
first. Most webapplications I have come across, regardless of what
they were programmed in, had a user settable "base url" that the
application would use whenever it needed to generate a url.
Setting this base url to that of the outside server generally solves
all the problems with bad links and redirects.

So if you for example have www.mysite.com as a forward proxy for
myinternalappserver.local all you need to do is tell the application
on your appserver to use www.mysite.com as basis for any url it
generates, in stead of its own host name. The configuration of your
reverse proxy then becomes trivial.

Krist



-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message