diff --git a/classes/modules/uriModule.php b/classes/modules/uriModule.php
index 79e8df205d1a9b41f13e46df5102721cae2cce33..520a044d2e0e18f51e52d9b865ad4b5b0e421cad 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 = eregi_replace("^(.+)\.html", "\\1", $localUri);
-    $uri_stripped =  eregi_replace("^(.+)\.html", "\\1", $uri);
+    $localUri_stripped = preg_replace("^(.+)\.html", "\\1", $localUri);
+    $uri_stripped =  preg_replace("^(.+)\.html", "\\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);