Index.php Redirect
This module automatically redirects any Drupal URLs that include "index.php" to their cleaner equivalents, helping to avoid duplicate content and improve SEO. It works out of the box with no configuration needed and supports various options for customization.
Index.php Redirect
Index.php Redirect automatically redirects Drupal URLs that expose the index.php front controller to their clean equivalents.
For example:
/index.php/documents/reportis redirected to:
/documents/reportThis helps prevent duplicate URLs, inconsistent links, and unwanted index.php URLs from being indexed by search engines.
Features
- Works immediately after installation with no required configuration.
- Uses a permanent 301 redirect by default.
- Can be configured to use a temporary 302 redirect.
- Preserves the complete path and query string.
- Supports Drupal installations located in a subdirectory.
- Excludes update.php, install.php, cron.php, and authorize.php by default.
- Allows additional excluded paths to be configured.
- Provides optional redirect logging through Drupal's logging system.
- Processes only main GET and HEAD requests, preventing submitted form data from being lost.
- Supports Drupal 10 and Drupal 11.
Post-installation
Enable the module normally. No configuration is required for the default behavior.
Optional settings are available at:
Administration > Configuration > Search and metadata > Index.php RedirectThe configuration page allows administrators to select the redirect status code, manage excluded paths, and enable redirect logging.
Additional requirements
No additional modules or third-party libraries are required.
The web server must already support Drupal clean URLs for the redirect destination to work.
Similar projects
The Redirect module provides comprehensive redirect and canonical URL management. Index.php Redirect is intended as a smaller, focused alternative for sites that only need to remove the /index.php/ component from Drupal URLs.
Legacy Redirect handles older index.php?q=path URL formats. Index.php Redirect instead handles modern URLs using the /index.php/path format.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 10–11 | Redirects /index.php/path URLs to their clean /path equivalents while preserving query strings. | Jul 17, 2026 |