Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Redirect 4xx

No security coverage
View on drupal.org

This module allows site administrators to redirect any 4xx error, such as 404 Not Found or 403 Forbidden, to a user-defined URL. It provides a way to unify error handling under a single page, which can be useful for specific site requirements.

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

  1. After installing the module, navigate to the configuration page: /admin/config/system/redirect4xx.
  2. Define the redirect destinations for different 4xx error codes.
  3. Choose the HTTP status code (e.g., 301, 302, 307) for each redirect.
  4. Once configured, the module will automatically redirect users encountering 4xx errors to the specified internal URLs.

Additional Requirements

No additional dependencies beyond Drupal core.

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.

Activity

Total releases
1
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
1.0.x-dev Dev Feb 10, 2025