Re: Limit access to *.jsf files

Splash Forums PrettyFaces Users Limit access to *.jsf files Re: Limit access to *.jsf files

#20995

RedShadow
Participant

I already had such a problem and i did it like that:

<rewrite match=”^/admin/((?!pageNotFound).)*.xhtml$” substitute=”/admin/pageNotFound.xhtml”/>

this will restrict access to all xhtml files except the pageNotFound.xhtml. if a request goes to a xhtml file, the request will be redirected to the pageNotFound.xhtml

Chaining does not work, but i still don’t know why.

This is tested for my case and should work.