diff --git a/classes/modules/uriModule.php b/classes/modules/uriModule.php
index ffdc7f3af630fb7f7e31c7c2c192f3abb5ee83c2..460e6fe5de1058813b227bf08854c041aecab101 100644
--- a/classes/modules/uriModule.php
+++ b/classes/modules/uriModule.php
@@ -21,8 +21,8 @@ class UriModule extends abstractModule{
   	$pair = Queries::getMetadata($localUri, $acceptContentType, $metaDb);
     #Stripping html to look up and write correct url in database if not exists
     #Fix to handle pages that have not been loaded after cleaning out database 
-    $localUri_stripped = preg_replace("^(.+)\.html$", "\\1", $localUri);
-    $uri_stripped =  preg_replace("^(.+)\.html$", "\\1", $uri);
+    $localUri_stripped = preg_replace("/^(.+)\.html$/i", "\\1", $localUri);
+    $uri_stripped =  preg_replace("/^(.+)\.html$/i", "\\1", $uri);
     if($pair == NULL){ // Original URI is not in metadata
   	  if(Queries::uriExist($uri_stripped, $endpoints['local'])){
   	  	$page = Queries::createPage($uri_stripped, $localUri_stripped, $acceptContentType, $metaDb);