Index: globalredirect.admin.inc =================================================================== --- globalredirect.admin.inc (revision 214) +++ globalredirect.admin.inc (working copy) @@ -12,7 +12,7 @@ function globalredirect_settings() { $form = array(); - $form['globalredirect_deslah'] = array( + $form['globalredirect_deslash'] = array( '#type' => 'radios', '#title' => t('Deslash'), '#description' => t('If enabled, this option will remove the trailing slash from requests. This stops requests such as example.com/node/1/ failing to match the corresponding alias and can cause duplicate content. On the other hand, if you require certain requests to have a trailing slash, this feature can cause problems so may need to be disabled.'), @@ -20,7 +20,7 @@ GLOBALREDIRECT_FEATURE_DISABLED => t('Off'), GLOBALREDIRECT_DESLASH_ENABLED => t('On'), ), - '#default_value' => variable_get('globalredirect_deslah', 1), + '#default_value' => variable_get('globalredirect_deslash', 1), ); Index: globalredirect.module =================================================================== --- globalredirect.module (revision 214) +++ globalredirect.module (working copy) @@ -106,7 +106,8 @@ } // Trim any trailing slash off the end (eg, 'node/1/' to 'node/1') - $request = (bool)variable_get('globalredirect_deslash', GLOBALREDIRECT_DESLASH_ENABLED) ? trim($_GET['q'], '/') : $_GET['q']; + $redirect_slash = variable_get('globalredirect_deslash', GLOBALREDIRECT_DESLASH_ENABLED) != GLOBALREDIRECT_FEATURE_DISABLED; + $request = $redirect_slash ? trim($_GET['q'], '/') : $_GET['q']; // Optional stripping of "/0". Defaultly disabled switch (variable_get('globalredirect_trailingzero', GLOBALREDIRECT_FEATURE_DISABLED)) { @@ -132,7 +133,10 @@ // Compare the request to the alias. This also works as a 'deslashing' agent. If we have a language prefix then prefix the alias if ($_REQUEST['q'] != $prefix . $alias) { - drupal_goto($alias, $query_string, NULL, 301); + //if it's not just a slash or user has deslash on, redirect + if(str_replace($prefix . $alias, '', $_REQUEST['q']) != '/' || $redirect_slash) { + drupal_goto($alias, $query_string, NULL, 301); + } } // If no alias was returned, the final check is to direct non-clean to clean - if clean is enabled