ai_404_redirect
1 sites
No security coverage
AI 404 Redirect is a Drupal module that uses artificial intelligence to automatically analyze 404 errors and suggest appropriate redirects to help users find the content they're looking for.
KEY FEATURES:
- AI-Powered Analysis: Leverages the Drupal AI module to intelligently match 404 paths to existing content using advanced algorithms
- Smart Matching: Advanced fallback system with typo detection, path structure matching, keyword analysis, and SOUNDEX fuzzy matching
- 404 Count Threshold: Prevents spam by requiring multiple occurrences before creating redirects (configurable, default: 4)
- Bot & Trolling Protection: Blocks suspicious activity including exploitation attempts, rate-limited IPs, and common attack patterns
- Asynchronous Processing: Queue-based system ensures 404 pages load instantly without blocking
- Comprehensive Admin Interface: Views-based interface for reviewing and managing redirect suggestions
- Auto-Approval: Automatically creates redirects when confidence and count thresholds are met
- Confidence Scoring: Each suggestion includes a confidence score (0-100) for transparency
HOW IT WORKS:
- When a 404 error occurs, the module intercepts it and queues it for asynchronous processing
- The system checks for suspicious activity (bots, exploitation attempts, rate limiting)
- If not blocked, the AI analyzes the 404 path and matches it to existing content
- The 404 count is incremented for the path
- High-confidence suggestions are auto-approved when thresholds are met
- All suggestions can be reviewed in the admin interface
REQUIREMENTS:
- Drupal 10 or 11
- AI Module (^1.2)
- Redirect Module (^1.6)
- Views Bulk Operations (^4.3)
- An AI provider configured in the AI module (OpenAI, Anthropic, etc.)
INSTALLATION:
- Install via Composer:
composer require drupal/ai_404_redirect - Enable the module:
drush en ai_404_redirect -y - Configure an AI provider in
/admin/config/ai/models - Configure the module at
/admin/config/search/ai-404-redirect
CONFIGURATION OPTIONS:
- Confidence Thresholds: Set low, medium, high, and auto-approve thresholds
- Minimum 404 Count: Require multiple occurrences before creating redirects (default: 4)
- Bot Blocking: Enable/disable protection against bots and trolling
- Suspicious IP Threshold: Block IPs hitting too many unique 404s (default: 10 per hour)
USE CASES:
- E-commerce sites: Automatically fix broken product links
- Content migrations: Handle URL changes during site migrations
- Typo recovery: Help users find content despite typos in URLs
- SEO improvement: Reduce 404 errors and improve user experience
- Maintenance: Automatically handle common broken link patterns
TECHNICAL DETAILS:
- Queue-based asynchronous processing for performance
- Database indexing for fast alias searches
- Keyword-based candidate matching with fuzzy search
- Comprehensive test suite (unit, kernel, functional tests)
- Follows Drupal coding standards
- Proper dependency injection and service architecture
For detailed documentation, see the README.md file included with the module.