Prevent suffix from being added to resources when page loads

前端 未结 2 945
自闭症患者
自闭症患者 2020-11-30 05:58

I have a JSF2 application running and working no problem. The issue I am having with JSF is with the resource bundle. All resources have the .xhtml suffix appe

2条回答
  •  爱一瞬间的悲伤
    2020-11-30 06:31

    You could have a look at Rewrite. Rewrite allows to modify URLs that are rendered to the page and modify them in any way you want. You could do something like this to add a CDN To your site:

    .addRule(CDN.relocate("{p}foo-{version}.css")
             .where("p").matches(".*")
             .where("version").matches(".*")
             .to("http://mycdn.com/foo-{version}.css"));
    

    I think it should be easy to implement your requirement using Rewrite.

    Have a look at the example configurations to learn about the features of rewrite.

提交回复
热议问题