diff --git a/globalredirect.admin.inc b/globalredirect.admin.inc
index 725da13..7292ea0 100644
--- a/globalredirect.admin.inc
+++ b/globalredirect.admin.inc
@@ -104,6 +104,14 @@ function globalredirect_settings() {
     '#default_value' => $settings['ignore_admin_path'],
   );
 
+  $form['settings']['base_path'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Drupal Base Path'),
+    '#description' => t('If Drupal is installed in a subdirectory beneath the web server document root, specify that directory here.  Value should start and end with a forward slash, e.g /drupal/, except in the default installation / (a single slash)'),
+    '#default_value' => $settings['base_path'],
+    '#size' => 30,
+  );
+
   $form['buttons']['submit'] = array(
     '#type' => 'submit',
     '#submit' => array('globalredirect_settings_submit_save'),
@@ -122,7 +130,7 @@ function globalredirect_settings() {
 
 /**
  * Save submit handler for the globalredirect_settings form.
- * Compares the submitted settings to the defaults and unsets any that are equal. This was we only store overrides.
+ * Compares the submitted settings to the defaults and unsets any that are equal. This way we only store overrides.
  */
 function globalredirect_settings_submit_save($form_id, &$form_state) {
   // Grab the defaults
@@ -131,11 +139,20 @@ function globalredirect_settings_submit_save($form_id, &$form_state) {
   // Copy out the settings
   $settings = $form_state['values']['settings'];
 
-  // Compare each setting to the default. If equal, remove. If not, cast to an int (FormAPI converts keys to string).
+  // Compare each setting to the default.
   foreach ($settings as $key => $value) {
+
+    // If the values are equal, remove it from the array.
     if ($value == $defaults[$key]) {
       unset($settings[$key]);
     }
+
+    // If the values are not equal, and the setting is 'base_path', save it.
+    elseif ($key == 'base_path') {
+      $settings[$key] = $value;
+    }
+
+    // If the values are not equal, cast the value to an int (FormAPI converts keys to string).
     else {
       $settings[$key] = (int)$value;
     }
diff --git a/globalredirect.module b/globalredirect.module
index 715e90f..94fff73 100644
--- a/globalredirect.module
+++ b/globalredirect.module
@@ -289,7 +289,7 @@ function _globalredirect_is_active($settings) {
    * @see http://drupal.org/node/205810
    * @see http://drupal.org/node/278615
    */
-  if ($_SERVER['SCRIPT_NAME'] != $GLOBALS['base_path'] .'index.php') {
+  if ($_SERVER['SCRIPT_NAME'] != $settings['base_path'] . 'index.php') {
     return FALSE;
   }
 
@@ -360,6 +360,7 @@ function _globalredirect_get_settings($default_only = FALSE) {
     'term_path_handler' => 1,
     'frontpage_redirect' => 1,
     'ignore_admin_path' => 1,
+    'base_path' => dirname($_SERVER['SCRIPT_NAME']) == '/' ? '/' : dirname($_SERVER['SCRIPT_NAME']) . '/',
   );
 
   if ($default_only) {
