--- require_login.module
+++ require_login.module
@@ -35,7 +35,7 @@ function require_login_permission() {
  * Implements hook_init().
  */
 function require_login_init() {
-  if (_require_login_is_exception(request_uri()) == FALSE) {
+  if (_require_login_is_exception(drupal_get_path_alias(), request_uri()) == FALSE) {
     drupal_set_message(t('You must login to use this site.'));
     drupal_goto('user/login', array('query' => array('destination' => $_GET['q'])));
   }
@@ -44,7 +44,7 @@ function require_login_init() {
 /**
  * Function to check if the current situation is excluded.
  */
-function _require_login_is_exception($request_uri) {
+function _require_login_is_exception($path, $request_uri) {
 
 	// Site under maintenance mode.
 	if (variable_get('maintenance_mode', 0) == 1) {
@@ -86,8 +86,8 @@ function _require_login_is_exception($request_uri) {
   }
 
   // Excluded paths.
-  $excluded_paths = explode("\n", variable_get('require_login_excluded_paths'));
-  if (in_array(trim($request_uri, '/'), $excluded_paths)) {
+  $excluded_paths = variable_get('require_login_excluded_paths');
+  if (drupal_match_path($path, $excluded_paths)) {
     return TRUE;
   }
 
