Re: Not seeing .css or images

Splash Forums Rewrite Users Not seeing .css or images Re: Not seeing .css or images

#22176
config.defineRule()
.when(
new HttpCondition() {

boolean evaluate(HttpServletRewrite event, EvaluationContext context)
{
return identity.isLoggedIn();
}

}.and(Direction.isInbound().andNot(
Path.matches("/img/{suffix}").where("suffix").matches(".*")
.or(Path.matches("/resources/css/{suffix}").where("suffix").matches(".*")
.or(Path.matches("/pages/users/CRUDUser.xhtml")
.or(Path.matches("/pages/error/generalError.xhtml")
.or(Path.matches("/pages/error/viewExpired.xhtml")
.or(Path.matches("/pages/landing.xhtml"))))))))
.perform(Redirect.temporary(context.getContextPath() + "/pages/landing.xhtml")));

If you like, you can just create it as its own class and use it like any other condition.

Regarding the CSS issue. I think you can figure this out :) There’s one big reason why CSS will not be rendered… because the file cannot be found. I’m guessing that you’re going to see the landing page rendered in the source of your CSS files. If so, your solution should be simple…

Just figure out which part of the rule is making that happen, and fix it :)