Re: Not seeing .css or images

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

#22175

Tony Herstell
Participant

> What is different about that page?

It has no rules protecting it… :)

If I go through the landing page and login then go to another page I am fine.

I am even fine if I just login and go to the landing page.

The rule only fires if I am not logged in.

I checkin loggedIn status like this:

@Inject
private Identity identity;
....
ConfigurationBuilder config = ConfigurationBuilder.begin();
if (this.identity.isLoggedIn()) {

// For now I am happy to allow access to all pages...

}
else {
config.defineRule()
.when(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"));
}
return config;
}

I am not sure what the HttpCondition achieves as this loginCheck seems to work too well ;)