Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Re: Page Not Found for Registered Users

posts: 215

If you are willing to change the code to accomplish this, it is a small change, but you must remember that updates in the future may remove your change.

If you are redirecting to your custom "Page Not Found" page for anonymous users by having set the General, Navigation, "URL an anonymous is redirected when page not found" option, then that option is checked in tiki-index.php. The code that checks it looks like this:

Copy to clipboard
if (!$isprefixed && !empty($prefs['url_anonymous_page_not_found']) && empty($user)) { $access->redirect($prefs['url_anonymous_page_not_found']);


When someone is logged in, the $user is not empty so they are not sent to the custom "Page Not Found". You can have it ignore if someone is logged in by removing the "&& empty($user)" so it looks like:

Copy to clipboard
if (!$isprefixed && !empty($prefs['url_anonymous_page_not_found'])) { $access->redirect($prefs['url_anonymous_page_not_found']);


And then it will redirect even if the page was not found for a logged in user.

Tom

There are no comments at this time.