Skip to main content
Drupal is a registered trademark of Dries Buytaert
Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Usage Milestone: Menu Block Module menu_block crossed 1,000 active installs. Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Release: Change Requests 2.1.9 Minor update available for module change_requests (2.1.9). Release: Arguments 1.0.12 Minor update available for module arguments (1.0.12). Release: Thunder 8.4.3 Minor update available for distribution thunder (8.4.3). Release: Thunder 8.4.2 Minor update available for distribution thunder (8.4.2). Release: OIDC Role Mapping 1.0.0 Initial release available for module oidc_role_mapping (1.0.0)! Release: Views HTTP Client 1.0.1 Minor update available for module views_http_client (1.0.1). Security Coverage: Entity Add Another Module entity_add_another now has official Drupal security advisory coverage.

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/report

is redirected to:

/documents/report

This 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 Redirect

The 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

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.x-dev Dev 10–11 Jul 17, 2026