Re: Not seeing .css or images

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

#22180

Tony Herstell
Participant

Humm…

@Override
public Configuration getConfiguration(final ServletContext context) {

// The standard annotations on my pages will provide
// "pretty re-write rules".

ConfigurationBuilder config = ConfigurationBuilder.begin();
config.defineRule()
.when(
new HttpCondition() {
@Override
public boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
{
return !identity.isLoggedIn();
}

}.and(Direction.isInbound()
.andNot(
new HttpCondition() {
@Override
public boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
{
return event.getRequestPath().contains("javax.faces.resource");
}}
.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/error/unauthorisedAccess.xhtml")
.or(Path.matches("/pages/landing.xhtml")))))))))
.perform(Redirect.temporary(context.getContextPath() + "/pages/error/unauthorisedAccess.xhtml"));
return config;
}