Browse Source

Cleaner regex

Signed-off-by: Aaron Kuzemchak <aaron@kuzemchak.net>
Aaron Kuzemchak 12 years ago
parent
commit
581fcc5c47
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/laravel.php

+ 1 - 1
laravel/laravel.php

@@ -137,7 +137,7 @@ $languages[] = Config::get('application.language');
 
 foreach ($languages as $language)
 {
-	if (preg_match("#^{$language}(/.*)?$#i", $uri))
+	if (preg_match("#^{$language}(?:$|/)#i", $uri))
 	{
 		Config::set('application.language', $language);