diff --git a/src/Data/Url.hs b/src/Data/Url.hs
--- a/src/Data/Url.hs
+++ b/src/Data/Url.hs
@@ -3,6 +3,7 @@
   , DeriveFunctor
   , KindSignatures
   , OverloadedStrings
+  , OverloadedLists
   , FlexibleInstances
   , StandaloneDeriving
   , TypeSynonymInstances
@@ -35,6 +36,7 @@
 
 import Data.Functor.Identity
 import Data.Functor.Compose
+import Data.Maybe (maybe)
 import Data.URI (URI (..))
 import Data.URI.Auth (URIAuth (..))
 import Data.URI.Auth.Host (URIAuthHost (Localhost))
@@ -413,10 +415,24 @@
 getPathChunks :: Path base type' -> V.Vector T.Text
 getPathChunks path = V.fromList $ fmap T.pack $ splitOn "/" $ dropWhile (== '/') (toFilePath path)
 
+
+
 packLocation :: Strict.Maybe T.Text -> Bool -> URIAuth -> Location base type' -> URI
 packLocation scheme slashes auth loc =
   URI scheme slashes auth
-    (getPathChunks $ locPath loc)
+    ( let unsnoc :: V.Vector a -> Maybe (V.Vector a, a)
+          unsnoc vs
+            | V.null vs = Nothing
+            | otherwise =
+                Just ( V.take (V.length vs - 1) vs
+                     , V.last vs
+                     )
+          fileExt :: T.Text
+          fileExt = maybe "" (("." <>) . T.pack) (locFileExt loc)
+      in  case unsnoc $ getPathChunks $ locPath loc of
+            Nothing -> [fileExt]
+            Just (xs,x) -> xs <> [x <> fileExt]
+    )
     ( V.fromList
         $ map (\(l,r) ->
             (T.pack l) Strict.:!:
diff --git a/urlpath.cabal b/urlpath.cabal
--- a/urlpath.cabal
+++ b/urlpath.cabal
@@ -1,5 +1,5 @@
 Name:                   urlpath
-Version:                8.0.0
+Version:                8.0.1
 Author:                 Athan Clark <athan.clark@gmail.com>
 Maintainer:             Athan Clark <athan.clark@gmail.com>
 License:                MIT
