Re: How can handle URL ?

Splash Forums PrettyFaces Users How can handle URL ? Re: How can handle URL ?

#21379

Rewriting resources like this would work if you explicitly map individual CSS files this way. But I think this would be too much work.

But you could use a rewrite rule to rewrite multiple files at once. Something like:

<rewrite match="/resources/css/([w-]+).css" substitute="/faces/abc/def/resources/css/$1.css" redirect="chain"/>

This would catch requests like:

http://example.com/resources/css/style.css

and internally forward them to:

http://example.com/faces/abc/def/resources/css/style.css

Take a look at this chapter of the documentation for details:

http://ocpsoft.com/docs/prettyfaces/3.3.0/en-US/html/inbound_rewriting.html#inbound_rewriting.matching

Christian