diff --git a/www/module.php b/www/module.php
index f79c1cbd5c258022c83aedfee303ef68be824883..19ccc586e854fde7414a4288e716e59bfd7a497f 100644
--- a/www/module.php
+++ b/www/module.php
@@ -140,7 +140,7 @@ try {
 
 	/* Find MIME type for file, based on extension. */
 	$contentType = NULL;
-	if (preg_match('#\.([^/]+)$#D', $path, $type)) {
+       if (preg_match('#\.([^/\.]+)$#D', $path, $type)) {
 		$type = strtolower($type[1]);
 		if (array_key_exists($type, $mimeTypes)) {
 			$contentType = $mimeTypes[$type];