Is it possible to redirect to a custom page if user doesn't have permission to view a page?
Permalink
I was wondering if it's possible to redirect someone to a custom page if they don't have permission to view the page, instead of redirecting to the login page. We would prefer to keep our login page as hidden as possible, and whenever someone tries to access a page that they don't have permission to view, they are taken to the login page, which we would prefer not to happen.
Is there a way to redirect to a custom page?
Is there a way to redirect to a custom page?
Thanks for directing me to this add-on!
The developer of the add-on said it doesn't do it at the moment, but it could be added.
The developer of the add-on said it doesn't do it at the moment, but it could be added.
FYI, i'm also interested in adding this feature and would buy it for some of my sites.
I found out where Concrete does this:
It's in \concrete\dispatcher.php line 190. I replaced the contents of the switch case with a redirect.
It's in \concrete\dispatcher.php line 190. I replaced the contents of the switch case with a redirect.
switch($cp->getError()) { case COLLECTION_FORBIDDEN: header( 'Location: '.YOUR_CUSTOM_LOCATION ); /* $v = View::getInstance(); $v->setCollectionObject($c); $v->render('/page_forbidden'); */ break; }
http://www.concrete5.org/marketplace/addons/url-director/...
You'd have to contact the developer to check for sure.