ProxyHTMLURLMap replaces url given two times

apache-2.2httpd.confmod-proxyreverse-proxyxampp

to explain the title, i have put this (this is the only htmlUrlMap) in my conf:

ProxyHTMLURLMap / /rp/ticket/

and this in my html:

<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>

what was expected:

<script type="text/javascript" src="/rp/ticket/js/jquery-1.8.3.min.js"></script> 

actual output:

<script type="text/javascript" src="/rp/ticket/rp/ticket/js/jquery-1.8.3.min.js"></script> 

which is wierd …
,
more of config:

<Location /rp/ticket/>
    ProxyHTMLEnable On

    ProxyHTMLBufSize  102400
    ProxyHTMLExtended On
    ProxyHTMLStripComments Off
    ProxyHTMLDocType "<!DOCTYPE html>"
    ProxyHTMLMeta Off
    ProxyHTMLCharsetOut *
    ProxyHTMLURLMap / /rp/ticket/
    ProxyPass http://ticket.domain.com/
    ProxyPassReverse http://domain.com/

    SetOutputFilter INFLATE;proxy-html;DEFLATE
    RequestHeader    unset  Accept-Encoding
</Location>

my best guess was that the <location> is the cause of the problem and it is appended to my custom address , but after changing address to something different ("/rp/test") instead of getting

src="/rp/ticket/rp/test"

i got

src="/rp/test/rp/test"

so that is not the problem

i have Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 on WindowsServer 2008 (x64). installed apache with Xampp (xampp-win32-1.8.1-VC9.zip).

there is a good chance that i have miss-configured or have done some obvious mistake, but i was not able to fix this after two days.any help is appreciated .

———Edit:

looks like i did not understood how this works at all.
looking at the modified source there was a javascript comment

// What's the page height?

it was changed to :

/rp/ticket/rp/rp/ticket/ticket/rp/ticket//rp/ticket/rp/rp/ticket/ticket/rp/ticket/ What's the page height?

Best Answer

i ended up not using mod_proxy_html at all.and i don't suggest anyone using it...

the Other solution :

1.enable substitute_module (uncomment following line in httpd.conf)

LoadModule substitute_module modules/mod_substitute.so

2.Create a regex to change what you want , in my case :

Substitute "s|\"/|/rp/ticket/|iq"

3.add SUBSTITUTE to output filters

SetOutputFilter INFLATE;SUBSTITUTE;DEFLATE

done.