Hello,
I successfully configured mod_proxy_html to rewrite
relative URLs like the one in this document:
------------------------------------------
<html>
<body>
<a href="">
</body>
</html>
------------------------------------------
If I serve the above document from a private network
via reverse proxying with Apache on my "frontend server"
at
www.example.com and want that the "document root"
of all pages I serve from the backend is "foo",
as in
www.example.com/foo/ , the link in the above doc is
correctly rewritten to
/foo/x.html
But what if the link is generated via a _javascript_ program
directly in the user's browser, like the following:
------------------------------------------
<html>
<head>
<script>
function makeLink(){
var node = document.getElementById("foo");
node.href = ""> node.innerHTML = "link";
}
</script>
</head>
<body _onload_="makeLink();">
<a id="foo"></a>
</body>
</html>
------------------------------------------
The link is not rewritten, and the GET request to
www.example.com/x.html
ends up with a sad 404.
From the (very limited) knowledge I have about web stuff,
I don't see any way my frontend server can inject the right
link in that HTML page;
I'd like to know how do people usually handle this situation.
Regards,
Giovanni