Download & Extend

Drupal in subfolder, multisite, main domain doesn't work, addon domains work

Project:Global Redirect
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

I have drupal installed into a subdirectory public_html/drupal/. As usual the main domain for my hosting account is "tied" to public_html while addon domains that also use the same drupal as multisites are "tied" to their own subfolders.

Global redirect works fine on the addon domains, but doesn't work on my main domain.

I have found the reason to be in $GLOBALS['base_path'] variable. For the main domain it is "/", for the addons it is "drupal/". That is the reason why for my main domain the IF statement in case goes to TRUE and the script exits with FALSE.

I have created a workaround for my particular main domain so now everything works ok, but this should be implemented as a general solution.

Comments

#1

I also just hit this same problem. All of my sites are in a /drupal subdirectory, with my ISP providing a mod_rewrite site-redirect to various subdomains in the .htaccess of the root directory. Global redirect was broken for all my sites.

I fixed this by commenting out the following in globalredirect.module:

//if ($_SERVER['SCRIPT_NAME'] != $GLOBALS['base_path'] .'index.php') return FALSE;

I'm aware this might break other things, but it's working for me.

#2

nobody click here