I am trying to cache images, js and css
by configuring the cache settings in urlrewrite.
My js/css files are getting cached as expected but the images won't. I am unable to see the Expires header for the images, despite of various combinations of configurations.
Here's the configuration in urlrewrite.xml:
<rule>
<from>^.*\.(js|css|jpeg|jpg|png)$</from>
<set type="expires">2 years</set>
</rule>
Here's how the directories (and files) look like on the server
/html/images/foo.jpg
/html/js/bar.js
/html/css/xyz.css
/WEB-INF/urlrewrite.xml
/WEB-INF/web.xml
I have hunted for configurations everywhere I could think of and there is no specific configuration for images.
Where should I look further? Any help would be appreciated. Thank You.
PS : I have a struts/spring project.
in which application server you are deploying tomcat? if yes
use this url rewrite not required