Hi Benoit,

Could you try without the "pattern"  keyword in the rule definition like
this:

<rule dir="OUT" name="EXAMPLEUI/exampleui/outbound/apps">
    <rewrite template="example/apps"/>
</rule>
<rule dir="OUT" name="EXAMPLEUI/exampleui/outbound/nodemodule">
    <rewrite template="example/node_modules"/>
</rule>

<filter name="EXAMPLEUI/exampleui/outbound/app">
    <content type="application/javascript">
        <apply path="apps" rule="EXAMPLEUI/exampleui/outbound/apps"/>
        <apply path="node_modules" rule=
"EXAMPLEUI/exampleui/outbound/nodemodule"/>
    </content>
</filter>

You can try this for your usage:

<rule dir="OUT" name="GRAFANA/grafana/outbound/app/html">
    <rewrite template="grafana/app/partials"/>
</rule>

<rule dir="OUT" name="GRAFANA/grafana/outbound/public/html">
    <rewrite template="grafana/public/app"/>
</rule>

<filter name="GRAFANA/grafana/outbound/html/filter">
    <content type="*/html">
        <apply path="app/partials"
rule="GRAFANA/grafana/outbound/app/html"/>
        <apply path="public/app"
rule="GRAFANA/grafana/outbound/public/html"/>
   </content>
</filter>

Do not hesitate to put the full string like "app/partials/sidemenu.html" in
the filter path parameter if necessary (to avoid conflicts)

Le mer. 1 août 2018 à 22:20, Benoit Moisan <[email protected]> a
écrit :

>
> hello,
>
> i need some help on a rewrite rule. I have a html file with two types of
> url :
>
>
>
>    - <script src="public/app/app.ca0ab6f9.js"></script>
>    - <div ng-include="'app/partials/sidemenu.html'"></div>
>
>
> I succeed to modify first one with this filter and rule but it does not
> work with the second :
>
> <rule dir="OUT" name="GRAFANA/grafana/outbound/app/html"
> pattern="app/{**}">
>         <rewrite template="{$frontend[path]}/grafana/app/{**}"/>
>     </rule>
>
> <rule dir="OUT" name="GRAFANA/grafana/outbound/public/html"
> pattern="public/{**}">
>         <rewrite template="{$frontend[path]}/grafana/public/{**}"/>
>     </rule>
>
>     <filter name="GRAFANA/grafana/outbound/html/filter">
>         <content type="*/html">
>             <apply path="app/*" rule="GRAFANA/grafana/outbound/app/html"/>
>             <apply path="public/*"
> rule="GRAFANA/grafana/outbound/public/html"/>
>         </content>
>     </filter>
>
>
>
> thanks in advance
>
>

Reply via email to