Skip to content
Snippets Groups Projects
Commit c1373945 authored by ressa's avatar ressa Committed by Gisle Hannemyr
Browse files

Resolve #3327195 "Change readme.txt to"

parent 8703d2b6
No related branches found
No related tags found
1 merge request!2Resolve #3327195 "Change readme.txt to"
# Customerror
## Contents of this file
- Introduction
......@@ -10,7 +12,6 @@
## Introduction
**Customerror** allows the site administrator to create custom error
pages for HTTP status codes 403 (access denied) and 404 (page not
found), without the need to create nodes for each of them.
......@@ -48,42 +49,37 @@ accommodate future error codes easily.
`/admin/help/ah/customerror/README.md`.
## Installation:
## Installation
1. Install as you would normally install a contributed drupal
module. See: [Installing modules][5] for further information.
2. To install, tick the **Customerror** module on the *Extend*
page. Click on "Install".
## Configuration:
## Configuration
First, configure Basic site error reporting:
1. Navigate to **Manage » Configuration » System » Basic site
settings**
- In the "Error pages" section, for 403 (access denied), enter
the value: customerror/403 - For 404 (not found), enter the
value: "`customerror/404`".
- Click on "Save configuration".
2. Configure the module:
- Navigate to **Manage » Configuration » System » Custom error**.
- Enter any title and description you want for the 404 (not found)
and 403 (access denied) pages.
- You can use any HTML tags to format the text.
Click on Save configuration.
3. Test your error pages.
- Copy your present admin page url.
- Try to go to a non-existent Drupal page on your site.
You should see your custom error page for 404 (not found) page.
- Log out from your site.
- Paste the admin page url and try to go there.
You should see your custom error page for 403 (access denied) page.
settings**
- In the "Error pages" section, for 403 (access denied), enter
the value: `customerror/403`
- For 404 (not found), enter the value: `customerror/404`
- Click on "Save configuration".
1. Configure the module:
- Navigate to **Manage » Configuration » System » Custom error**.
- Enter any title and description you want for the 404 (not found)
and 403 (access denied) pages.
- You can use any HTML tags to format the text.
- Click on Save configuration.
1. Test your error pages.
- Copy your present admin page url.
- Try to go to a non-existent Drupal page on your site.
You should see your custom error page for 404 (not found) page.
- Log out from your site.
- Paste the admin page url and try to go there.
You should see your custom error page for 403 (access denied) page.
Note that **Customerror** keeps track of what page the user is trying to
access, so after logging in, the user will be redirected to that page.
......@@ -135,9 +131,9 @@ modifications there.
**Q: I want to have a different template for my 404 and 403 pages.**
**A:** Copy "`customerror.html.twig`" to
"`customerror--404.html.twig`" and "`customerror--403.html.twig`". You
do not need a "`customerror.html.twig`" for this to work.
**A:** Copy `customerror.html.twig` to
`customerror--404.html.twig` and `customerror--403.html.twig`. You
do not need a `customerror.html.twig` for this to work.
**Q: Some 403 errors (e.g. "http://example.org/includes") are served
by the Apache web server and not by Customerror. Isn't that a
......@@ -155,7 +151,7 @@ ErrorDocument 403 /error/403.html For more information about this, see
## Maintainers
The project's owner is [kbahey][6] (Khalid Baheyeldin –
The project's owner is [kbahey][6] (Khalid Baheyeldin -
[https://baheyeldin.com/khalid][7] and [https://2bits.com/][8]).
The current maintainer is [gisle][8] (Gisle Hannemyr).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment