Hi,

I need some help on a rewrite rule.I have a java script which is internally 
calling other java scripts.So I tried to modify the url of those javascript 
using filters.

Java scripts url : </cdap_assets/img/cdap_logo.png>


But these requests are not changing.


    <rule dir="OUT" name="CDAPUI/cdapui/outbound/imgs" pattern="img/{**}">
        <rewrite template="{$frontend[path]}/cdapui/cdap_assets/img/{**}"/>
    </rule>

    <rule dir="OUT" name="CDAPUI/cdapui/outbound/img">
        <rewrite template="cdapui/cdap_assets/img/cdap_logo.png"/>
    </rule>

    <filter name="CDAPUI/cdapui/outbound/app">
    <content type="application/javascript">
        <apply path="/cdap_assets/img/cdap_logo.png" 
rule="CDAPUI/cdapui/outbound/img"/>
    </content>
    </filter>


Also, I tied the rule to service.xml like:

    <routes>
        <route path="/cdapui/**">
            <rewrite apply="CDAPUI/cdapui/outbound/app" to="response.body"/>
        </route>
    </routes>


Thanks in advance!









Reply via email to