-
- 181 Posts
I have my error page set to ID 20. I have my unauthorized page set to ID 208, which is my login page.
On my protected pages, which are ID’s 163, 207 & 209 I have placed the [[!isLoggedin]] snippet.
If a user tries to visit one of the protected pages without being logged in they are directed to the error page instead of the unauthorized page. Is there something I am missing? Does the [[!Profile]] snippet or [[!login]] snippet need to be included on the pages with the [[!isLoggedin]]?
-
- 24,544 Posts
In Revolution, pages that you aren’t authorized to see are "not found" when MODx looks for them so they sort of don’t exist and you end up at the 404 page when you try to access them.
I think the solution is to give the users "load only" permission for them. That way they will exist but the use won’t be able to "view" them.
-
- 181 Posts
BobRay,
I would like anyone who may be accessing the protected pages, whether they are a user or not, to be directed to the login if they are not logged in already.
I tried to set my anonymous users to give them load only permission, but I am still getting the error 404 page instead of redirecting them to the login page.
-
- 24,544 Posts
That should work. Be sure you’ve flushed permissions, cleared the site and browser cache, and flushed sessions.