Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
customerror
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
customerror
Commits
150a4fd6
Commit
150a4fd6
authored
11 years ago
by
Gisle Hannemyr
Browse files
Options
Downloads
Patches
Plain Diff
by gisle: Some changes to make the README.txt more readable..
parent
0adc2ffc
Branches
Branches containing commit
Tags
7.x-1.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.txt
+36
-25
36 additions, 25 deletions
README.txt
with
36 additions
and
25 deletions
README.txt
+
36
−
25
View file @
150a4fd6
Copyright 2005 http://2bits.com
CUSTOM ERROR README.txt
=======================
Description
-----------
This module allows the site admin to create custom error pages for
404 (not found), and 403 (access denied).
Since the error pages are not real nodes, they do not belong a category
term, and hence will not show up in node listings.
It also allows the site admin to setup redirects for 404s. For example
if you had a page called foo and a page called xyz, then you moved them
to a page called bar, and abc respectively, you can setup a redirect pair
of:
^foo$ bar
^xyz$ abc
Users trying to access example.com/foo will be transparently redirected
to example.com/bar.
This module allows the site admin to create custom error pages for 404
(not found), and 403 (access denied).
Since the error pages are not real nodes, they do not have a specific
content type, and will not show up in node listings.
Features
--------
* Configurable page title and descriptions.
* Any HTML formatted text can be be put in the page body.
* Handles 404 and 403 errors at present. Drupal only allows those two
...
...
@@ -39,9 +27,31 @@ Features
* Return the correct HTTP status codes (403 and 404), which will
prevent robots from indexing the error pages.
It also allows the site admin to setup static redirects for 404s. For
example if you had a page called foo and a page called xyz, then you
moved them to a page called bar, and abc respectively, you can setup a
redirect pair of:
^foo$ bar
^xyz$ abc
The first pair will transparently redirect users trying to access
example.com/foo to example.com/bar. The first pair will transparently
redirect users trying to access example.com/xyz to example.com/abc.
You can have multiple pairs of redirects. Each must be on a line by
itself.
Note that the first string is a regexp, and the second string is a
path. You have to use a single space between them. You cannot use
variables. For more flexible URL rewriting, including variables, you
may consider using an external URL rewrite engine, such as Apache
mod_rewrite.
Redirecting upon login
----------------------
Here is an example of how to add custom PHP to a 403 to give the user the
option to login then redirect them to what they were after.
...
...
@@ -68,13 +78,15 @@ Thanks to: Andrew Berry (http://drupal.org/user/71291 deviantintegral).
Database
--------
This module does not require any new database tables to be installed.
Installation:
-------------
1. Copy the customerror.module to the Drupal modules/ directory.
1. Install the customerror module directory in the directory where you
keep contributed modules (e.g. sites/all/modules/).
2. Go to the Modules page
- Enable the customerror module.
...
...
@@ -146,9 +158,8 @@ Author
Khalid Baheyeldin (http://baheyeldin.com/khalid and http://2bits.com)
If you use this module, find it useful, and want to send the author
a thank you note, then use the Feedback/Contact page at the URL above.
The author can also be contacted for paid customizations of this
and other modules.
If you use this module, find it useful, and want to send the author a
thank you note, then use the Feedback/Contact page at the URL above.
The author can also be contacted for paid customizations of this and
other modules.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment