Search code examples
javawebserverwebsphere

URL Rewrite Rules in Websphere


Referring to previous question

What is an elegant way to force browsers to reload cached CSS/JS files?

I have changed the file name based on last modified timestamps. i.e. from "scripts/main.js" to "scripts/main.1221534296.js"

I am using WebSphere Application Server 6.1. Is there any way to define URL rewrite rule in it to get real file name from generated file name when a request to load such resource is received?


Solution

  • We do all our rewrite rules in the fronting web server (in our case, IBM HTTP Server). See these articles for how to do that:

    Note particularly the [PT] flag.

    I don't know of any way to create rewrite rules within WebSphere itself. You may require a web filter like https://github.com/paultuckey/urlrewritefilter/