redirect4xx
No security coverage
This module allows site administrators to unify error pages by redirecting any 4xx error (e.g., 403, 404, 410) responses to a specific URL. While redirecting error pages can negatively impact SEO, this module provides an option for cases where it is necessary.
Features
- Redirects all 4xx errors (e.g., 403, 404, 410) to user-defined paths.
- Supports configurable HTTP status codes for redirection (any 3xx status can be selected).
- Redirects are limited to internal paths, but there is no strict validation, allowing flexibility (e.g., returning static HTML responses).
- Helps unify error page handling under a single URL.
- Can be useful for sites that require custom error page behavior, such as membership-based sites where unauthorized users should be sent to a login page.
Post-Installation
- After installing the module, navigate to the configuration page:
/admin/config/system/redirect4xx. - Define the redirect destinations for different 4xx error codes.
- Choose the HTTP status code (e.g., 301, 302, 307) for each redirect.
- Once configured, the module will automatically redirect users encountering 4xx errors to the specified internal URLs.
Additional Requirements
No additional dependencies beyond Drupal core.
Recommended Modules/Libraries
- Redirect 403 to User Login: Useful if you specifically need to redirect 403 errors to a login page.
Similar Projects
- Redirect – A general-purpose module for managing URL redirects but does not specifically target 4xx errors.
- Redirect 404 to Home Page – Focuses only on redirecting 404 errors to the home page.
Supporting this Module
Currently, there are no plans for external funding or support programs.
Community Documentation
No external documentation is currently available.