If the script executing is not index.php then do not redirect in front_page_init()

<?php
 
if (!empty($_SERVER['SCRIPT_FILENAME']) &&
strpos($_SERVER['SCRIPT_FILENAME'], 'index.php', strlen($_SERVER['SCRIPT_FILENAME']) - strlen('index.php')) === FALSE) {
    return;
  }
?>

OR
<?php
 
if (!empty($_SERVER['SCRIPT_FILENAME']) && DRUPAL_ROOT . '/index.php' != $_SERVER['SCRIPT_FILENAME']) {
    return;
  }
?>

Both work.
Files: 

Comments

Subscribe
I need this to run cron.php is it going to be a patch?

Status:Active» Needs review
StatusFileSize
new382 bytes

Patch attached :)

Thanks you saved me! Worked like a charm. Happy new Year!

Status:Needs review» Reviewed & tested by the community

Works for me too!

Cross-referencing #1620074: redirect breaks cron & #1470550: Using Front Page with installation profile as the concerned code is the same.

Status:Reviewed & tested by the community» Fixed

Committed. Thanks!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.