How to change "Access Denied" message?
abelleba - August 15, 2008 - 21:20
I'm using the pushbutton theme but I cannot change the message from Access Denied to my custom 403 page. I have changed it in Administer » Site configuration » Error Reporting and can't get it to display my customized page. I would be happy if I could just change the string alone without crashing the module.
I grepped for the string and blog.module file came up. I tried to change that but it didn't work either.
I have also tried adding this like to .htaccess:
ErrorDocument 403 403.php
Any ideas or suggestions?

403 page
There really isn't much to it. Create a page node and enter the path into the 403 input (exp: node/43) If you're using pathauto, you can give the page an alias like "access_denied" or something fun like "twilight_zone" with a spinning vortex. Or not.
ty
Wow that worked. I tried just uploading a page into the folder instead of making a node with the same information. Thanks for the reply. :)
Problems because front page of site is for authenticated users
Hi folks:
I am having a problems with the 403 message because front page of site is for authenticated users. The login and register block appears fine (so users can get into the site from there when they are not logged in).
I created a page node for the customized 403 message. That page is being called for certain areas (so it partially works), but for the front page of the site, it is still calling the default message when a user is not logged in.
For instance, if I gave a non-authenticated user a random page node and they tried to view it, they would get the tailored 403 message, but if you just visited the site, you get the access denied message.
The site is setup so that even the front page is not viewable to the general public (its a homeowner community that really wants to be private). any ideas on how to make the customized 403 message work on that private front page?
Thanks in advance,
Brian
different front page for anonymous and authenticated users
You might want to take a look at the Front Page module. It allows you to have different front pages for anonymous and authenticated users. In your case the anonymous front page could instruct anonymous users they must either login or register before accessing the content.
-------------------------------------------------------
"If you don't read the newspaper you are uninformed;
if you do read the newspaper you are misinformed."
-- Mark Twain
There is a module that lets
There is a module that lets you display your own error messages in 403 and 404 pages without creating a new node.
http://drupal.org/project/customerror
-----
Drupal theming services, PSD to Drupal
http://kahthong.com
Wow, simple and spectacular
Thanks for the quick response! The customerror module worked like a charm!
CustomError 5.x vs. 6.x
Whoa, anyone notice the archive file size difference between the two versions of CustomError? 6.x is 10.83 KB while 5.x weighs in at a whopping 88.04 KB. Either the 5.x version does a whole lot more than the 6.x version or the maintainer became much more efficient at coding.
-------------------------------------------------------
"If you don't read the newspaper you are uninformed;
if you do read the newspaper you are misinformed."
-- Mark Twain
It does the same
It does the same thing.
Probably due to Drupal 6.x's new API.
-----
Drupal theming services, PSD to Drupal
http://kahthong.com
There's not THAT much of a difference...
...between the two API versions that would cause such a size discrepancy.
No matter--I was just curious.
-------------------------------------------------------
"If you don't read the newspaper you are uninformed;
if you do read the newspaper you are misinformed."
-- Mark Twain
After hours of searching ....
Anonymous access was re-directed to custom error page perfectly in 5.x and was driving me spare trying to get it to work in 6.9.
Then after hours of searching and checking out issues ... finally found this.
Many thanks, works perfectly.
Cliona