diff --git a/globalredirect.module b/globalredirect.module
index 715e90f..62b9ef2 100644
--- a/globalredirect.module
+++ b/globalredirect.module
@@ -117,7 +117,7 @@ function globalredirect_init() {
   }
 
   // If the feature is enabled, check and redirect taxonomy/term/* requests to their proper handler defined by hook_term_path().
-  if ($settings['term_path_handler'] && module_exists('taxonomy') && preg_match('/taxonomy\/term\/([0-9]+)$/', $request, $matches)) {
+  if ($settings['term_path_handler'] && module_exists('taxonomy') && preg_match('`^taxonomy/term/(\d+)$`', $request, $matches)) {
     // So the feature is enabled, as is taxonomy module and the current request is a taxonomy term page.
     // NOTE: This will only match taxonomy term pages WITHOUT a depth modifier
     $term = taxonomy_get_term($matches[1]);
