diff --git a/redirect.admin.inc b/redirect.admin.inc
index 176f105..a6610d5 100644
--- a/redirect.admin.inc
+++ b/redirect.admin.inc
@@ -521,6 +521,7 @@ function redirect_edit_form_validate($form, &$form_state) {
 
   if (empty($form_state['values']['override'])) {
     if ($existing = redirect_load_by_source($redirect->source, $redirect->language)) {
+      $existing = $existing[1];
       if ($redirect->rid != $existing->rid && $redirect->language == $existing->language) {
         // The "from" path should not conflict with another redirect
         $form_state['storage']['override_messages']['redirect-conflict'] = t('The base source path %source is already being redirected. Do you want to <a href="@edit-page">edit the existing redirect</a>?', array('%source' => $redirect->source, '@edit-page' => url('admin/config/search/redirect/edit/'. $existing->rid)));
@@ -636,32 +637,46 @@ function redirect_settings_form($form, &$form_state) {
   $form['globals'] = array(
     '#type' => 'fieldset',
     '#title' => t('Always enabled redirections'),
-    '#description' => t('(formerly Global Redirect features)'),
-    '#access' => FALSE,
   );
   $form['globals']['redirect_global_home'] = array(
     '#type' => 'checkbox',
-    '#title' => t('Redirect from paths like index.php and /node to the root directory.'),
+    '#title' => t('Redirect alternative front page URLs to the root directory.'),
     '#default_value' => variable_get('redirect_global_home', 1),
-    '#access' => FALSE,
+    '#description' => t('Includes all aliases for the front page, %root, as well as %node if a default front page is not set.', array('%root' => '/index.php', '%node' => '/node')),
+  );
+  $form['globals']['redirect_global_index'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Remove index.php from all non-front page paths.'),
+    '#default_value' => variable_get('redirect_global_index', 0),
+    '#description' => t('Will remove index.php from paths such as %prepend and %append.', array('%prepend' => '/index.php?q=node/1', '%append' => '/page-alias/index.php')),
   );
   $form['globals']['redirect_global_clean'] = array(
     '#type' => 'checkbox',
     '#title' => t('Redirect from non-clean URLs to clean URLs.'),
     '#default_value' => variable_get('redirect_global_clean', 1),
     '#disabled' => !variable_get('clean_url', 0),
-    '#access' => FALSE,
   );
   $form['globals']['redirect_global_canonical'] = array(
     '#type' => 'checkbox',
     '#title' => t('Redirect from non-canonical URLs to the canonical URLs.'),
     '#default_value' => variable_get('redirect_global_canonical', 1),
   );
+  $form['globals']['redirect_global_canonical_front'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Redirect the front page to its canonical URL.'),
+    '#default_value' => variable_get('redirect_global_canonical_front', 0),
+    '#description' => t('Add a path to a request for the site root. For example, a request for %rootpath will redirect to %canonicalpath if the default front page is set to %defaultfrontpage.', array('%rootpath' => 'http://example.com/', '%canonicalpath' => 'http://example.com/node/1', '%defaultfrontpage' => 'node/1')),
+  );
   $form['globals']['redirect_global_deslash'] = array(
     '#type' => 'checkbox',
     '#title' => t('Remove trailing slashes from paths.'),
-    '#default_value' => variable_get('redirect_global_deslash', 0),
-    '#access' => FALSE,
+    '#default_value' => variable_get('redirect_global_deslash', 1),
+  );
+  $form['globals']['redirect_global_add_slash'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Add trailing slashes to paths.'),
+    '#description' => t('For use with the Trailing Slash module instead of editing the .htaccess file.'),
+    '#default_value' => variable_get('redirect_global_add_slash', 0),
   );
   $form['globals']['redirect_global_admin_paths'] = array(
     '#type' => 'checkbox',
@@ -669,7 +684,11 @@ function redirect_settings_form($form, &$form_state) {
     '#default_value' => variable_get('redirect_global_admin_paths', 0),
   );
 
-  $form['#submit'][] = 'redirect_settings_form_submit';
+  $form['submit'] = array(
+    '#validate' => array('redirect_settings_form_validate'),
+    '#submit' => array('redirect_settings_form_submit'),
+  );
+
   return system_settings_form($form);
 }
 
@@ -682,6 +701,17 @@ function redirect_settings_form_submit($form, &$form_state) {
   redirect_page_cache_clear();
 }
 
+/**
+ * Form validator; makes sure conflicting settings aren't chosen.
+ *
+ * @see redirect_settings_form()
+ */
+function redirect_settings_form_validate($form, &$form_state) {
+  if ($form_state['values']['redirect_global_deslash'] && $form_state['values']['redirect_global_add_slash']) {
+    form_set_error('info', t('You can not have both %deslash and %add_slash enabled.', array('%deslash' => rtrim($form['globals']['redirect_global_deslash']['#title'], '.'), '%add_slash' => rtrim($form['globals']['redirect_global_add_slash']['#title'], '.'))));
+  }
+}
+
 function redirect_404_list($form = NULL) {
   $destination = drupal_get_destination();
 
diff --git a/redirect.module b/redirect.module
index 8c47b75..65d5599 100644
--- a/redirect.module
+++ b/redirect.module
@@ -244,21 +244,46 @@ function redirect_url_inbound_alter(&$path, $original_path, $path_language) {
     }
   }
 
-  // Redirect to canonical URLs.
-  if ($path && variable_get('redirect_canonical', 1)) {
-    $alias = drupal_get_path_alias($path, $path_language);
-    if ($alias != $path && $alias != $original_path) {
-      //return redirect_redirect(array('redirect' => $alias, 'type' => 'global'));
-    }
+  // Check for empty path.
+  if (empty($path)) {
+    return;
+  }
+  // Do not redirect if $original_path does not match the requested url.
+  if ($original_path != $_GET['q']) {
+    return;
+  }
+  // Do not redirect if disallowed.
+  if (!redirect_can_redirect()) {
+    return;
+  }
+
+  // Determine if front page. drupal_is_front_page() is not accurate here
+  // because drupal_path_initialize() has not executed yet.
+  $is_front_page = ($path == variable_get('site_frontpage', 'node') ? TRUE : FALSE);
 
-    // Redirect from default entity paths to the proper entity path.
-    //if ($path_entity = redirect_load_entity_from_path($path)) {
-    //  if ($uri = entity_uri($path_entity['entity_type'], $path_entity['entity'])) {
-    //    if ($path != $uri['path']) {
-    //      return redirect_redirect(array('redirect' => $uri['path'], 'redirect_options' => $uri['options'], 'type' => 'global'));
-    //    }
-    //  }
-    //}
+  // Redirect the front page to the root level.
+  if ($is_front_page
+      && variable_get('redirect_global_home', 0)
+      && !variable_get('redirect_global_canonical_front', 0)
+      && base_path() != request_uri()) {
+    return redirect_redirect((object)array('redirect' => '', 'type' => 'global'));
+  }
+
+  // Redirect to the canonical URL.
+  $alias = drupal_get_path_alias($path, $path_language);
+  if ((!$is_front_page && variable_get('redirect_global_canonical', 1)
+        || $is_front_page && variable_get('redirect_global_canonical_front', 0))
+      && $alias != $path
+      && $alias != $original_path) {
+    return redirect_redirect((object)array('redirect' => $alias, 'type' => 'global'));
+  }
+
+  // Redirect from default entity paths to the proper entity path.
+  if ($path_entity = redirect_load_entity_from_path($path)) {
+    $uri = entity_uri($path_entity['entity_type'], $path_entity['entity']);
+    if ($path != $uri['path']) {
+      return redirect_redirect((object)array('redirect' => $uri['path'], 'redirect_options' => $uri['options'], 'type' => 'global'));
+    }
   }
 }
 
@@ -323,29 +348,55 @@ function redirect_init() {
 
   // Fetch the current redirect.
   if ($redirect = redirect_get_current_redirect()) {
-    redirect_redirect($redirect);
+    redirect_redirect((object) reset($redirect));
   }
 
-  $redirect_global = FALSE;
-  $request_uri = $original_uri = ltrim(request_uri(), '/');
+  // Get the request URI without the $base_path prefix.
+  if (isset($_REQUEST['q'])) {
+    $path = $_REQUEST['q'];
+  }
+  else {
+    // This is a request using a clean URL. Extract the path from request_uri().
+    $request_path = strtok(request_uri(), '?');
+    $base_path_len = drupal_strlen(rtrim(dirname($_SERVER['SCRIPT_NAME']), '\/'));
+    // Unescape and strip $base_path prefix, leaving q without a leading slash.
+    $path = drupal_substr(urldecode($request_path), $base_path_len + 1);
+  }
+  $request_uri = $original_uri = ltrim($path, '/');
 
   // Redirect from non-clean URLs to clean URLs.
-  if (variable_get('redirect_global_clean', 1) && variable_get('clean_url', 0) && strpos($request_uri, '?q=') !== FALSE) {
-    //$redirect_global = TRUE;
-    //$request_uri = str_replace('?q=', '', $request_uri);
+  if (variable_get('redirect_global_clean', 1)
+      && variable_get('clean_url', 0)
+      && strpos(request_uri(), '?q=') !== FALSE) {
+    redirect_redirect((object)array('redirect' => $request_uri, 'type' => 'global'));
   }
 
-  if (strpos($request_uri, 'index.php') !== FALSE) {
-    //$redirect_global = TRUE;
-    //$request_uri = str_replace('index.php', '', $request_uri);
+  // Strip index.php
+  if (strpos(request_uri(), 'index.php') !== FALSE) {
+    if (!drupal_is_front_page() && variable_get('redirect_global_index', 0)) {
+      $request_uri = str_replace('index.php', '', $request_uri);
+      redirect_redirect((object)array('redirect' => $request_uri, 'type' => 'global'));
+    }
+    elseif (drupal_is_front_page() && variable_get('redirect_global_home', 0)) {
+      redirect_redirect((object)array('redirect' => '', 'type' => 'global'));
+    }
   }
 
-  //$request_uri = ltrim($request_uri, '/');
-  //$parsed = parse_url($request_uri);
-
-  if ($redirect_global && $request_uri != $original_uri) {
-    redirect_redirect(array(/*'redirect' => $request_uri,*/ 'type' => 'global'));
+  // Deslash (Remove trailing slashes from paths).
+  $langcode = isset($options['language']->language) ? $options['language']->language : '';
+  $alias = drupal_get_path_alias(current_path(), $langcode);
+  if (variable_get('redirect_global_deslash', 0)
+      && substr($request_uri, -1) == '/'
+      && $request_uri !== $alias) {
+    redirect_redirect((object)array('redirect' => rtrim($request_uri, '/'), 'type' => 'global'));
+  }
+  // Add slash (Add trailing slashes to paths).
+  elseif (variable_get('redirect_global_add_slash', 0)
+          && substr($request_uri, -1) !== '/'
+          && !drupal_is_front_page()) {
+    redirect_redirect((object)array('redirect' => $request_uri . '/', 'type' => 'global'));
   }
+
 }
 
 /**
@@ -596,7 +647,7 @@ function redirect_load_by_source($source, $language = LANGUAGE_NONE, array $quer
       $context = array('language' => $language, 'query' => $query);
       drupal_alter('redirect_load_by_source', $redirects, $source, $context);
 
-      return !empty($redirects) ? reset($redirects) : FALSE;
+      return !empty($redirects) ? $redirects : FALSE;
     }
   }
 
@@ -711,7 +762,7 @@ function redirect_validate($redirect, $form, &$form_state) {
   }
 }
 
-function redirect_object_prepare($redirect, $defaults = array()) {
+function redirect_object_prepare(stdClass $redirect, $defaults = array()) {
   $defaults += array(
     'rid' => NULL,
     'type' => 'redirect',
@@ -979,7 +1030,7 @@ function redirect_purge_inactive_redirects(array $types = array('redirect'), $in
  *
  * @ingroup redirect_api
  */
-function redirect_redirect($redirect = NULL) {
+function redirect_redirect(stdClass $redirect = NULL) {
   // First check if we're in an infinite loop.
   $session_id = session_id();
   if (flood_is_allowed('redirection', 5, 15, $session_id ? $session_id : NULL)) {
@@ -1028,6 +1079,12 @@ function redirect_redirect($redirect = NULL) {
  */
 function redirect_goto($redirect) {
   $redirect->redirect_options['absolute'] = TRUE;
+  // Prevent a path like 'index.php?q=node/1' from redirecting to '?q=path-alias'
+  // if canonical redirection is disabled. This will make url() treat 'node/1'
+  // as if it is already an alias and prevent a drupal_get_path_alias() lookup.
+  if (!variable_get('redirect_global_canonical', 0)) {
+    $redirect->redirect_options['alias'] = TRUE;
+  }
   $url = url($redirect->redirect, $redirect->redirect_options);
   drupal_add_http_header('Location', $url);
   drupal_add_http_header('Status', redirect_status_code_options($redirect->status_code));
@@ -1310,8 +1367,12 @@ function redirect_variables() {
     'redirect_page_cache' => 0,
     'redirect_purge_inactive' => 0,
     'redirect_global_home' => 1,
+    'redirect_global_index' => 0,
     'redirect_global_clean' => 1,
     'redirect_global_canonical' => 1,
+    'redirect_global_canonical_front' => 0,
+    'redirect_global_deslash' => 1,
+    'redirect_global_add_slash' => 0,
     'redirect_global_admin_paths' => 0,
   );
 }
