Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
During testing I hit this problem.
My site was running on: http://drupal.local/site6 and the redirect did not work.
It turned out that this check:
&& $_SERVER['SCRIPT_NAME'] == '/index.php' &&
caused the problems, because actually the $_SERVER['SCRIPT_NAME'] contains: "site6/index.php"
Is this check really necessary?
Comments
Comment #1
Andy Inman CreditAttribution: Andy Inman commentedThanks for the report. That check is not necessary in most installations, you can probably just remove it - under normal circumstances the current script will be index.php. Changing that test to the following should allow it to work as intended:
I'm setting status here to bug report.
Comment #2
Andy Inman CreditAttribution: Andy Inman commentedSee also #1543876: MultiLink breaks language switcher links if drupal is running in a subdirectory
Comment #4
Andy Inman CreditAttribution: Andy Inman at netgenius.co.uk commented