diff --git a/src/Cartalyst/AsseticFilters/UriRewriteFilter.php b/src/Cartalyst/AsseticFilters/UriRewriteFilter.php
index <HASH>..<HASH> 100644
--- a/src/Cartalyst/AsseticFilters/UriRewriteFilter.php
+++ b/src/Cartalyst/AsseticFilters/UriRewriteFilter.php
@@ -264,7 +264,7 @@ class UriRewriteFilter implements FilterInterface {
 			}
 		}
 
-		$base = $_SERVER['REQUEST_URI'];
+		$base = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null;
 
 		if ($request->getHost())
 		{
check for REQUEST_URI before assigning it

prevents exceptions from being thrown if executed through cli