diff --git a/FileCGIApp.hs b/FileCGIApp.hs
--- a/FileCGIApp.hs
+++ b/FileCGIApp.hs
@@ -15,11 +15,11 @@
 fileCgiApp :: ClassicAppSpec -> FileAppSpec -> CgiAppSpec -> RevProxyAppSpec -> RouteDB -> Application
 fileCgiApp cspec filespec cgispec revproxyspec um req = case mmp of
     Fail -> do
-        let st = statusPreconditionFailed
+        let st = preconditionFailed412
         liftIO $ logger cspec req st Nothing
         fastResponse st defaultHeader "Precondition Failed\r\n"
     Redirect -> do
-        let st = statusMovedPermanently
+        let st = movedPermanently301
             hdr = defaultHeader ++ redirectHeader req
         liftIO $ logger cspec req st Nothing
         fastResponse st hdr "Moved Permanently\r\n"
@@ -55,6 +55,7 @@
   | otherwise                = getRoute key ms
 getRoute key (m@(RouteRevProxy src _ _ _):ms)
   | src `isPrefixOf` key     = Found m
+  | src `isMountPointOf` key = Redirect
   | otherwise                = getRoute key ms
 
 isPrefixOf :: Path -> ByteString -> Bool
diff --git a/mighttpd2.cabal b/mighttpd2.cabal
--- a/mighttpd2.cabal
+++ b/mighttpd2.cabal
@@ -1,5 +1,5 @@
 Name:                   mighttpd2
-Version:                2.5.3
+Version:                2.5.4
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
diff --git a/sample.route b/sample.route
--- a/sample.route
+++ b/sample.route
@@ -16,9 +16,8 @@
 # Reverse proxy rules should be specified with ">>"
 # /path >> host:port/path2
 # Either "host" or ":port" can be committed, but not both.
-/app/cal         >> example.net/calendar
-# URLs generated by Yesod are absolute.
-# We cannot re-write pathinfo.
-/app/wiki        >> :8080/app/wiki
+/app/cal/        >> example.net/calendar/
+# Yesod app in the same server
+/app/wiki/       >> 127.0.0.1:8080/
 
 /                -> /export/www/
diff --git a/test/Test.hs b/test/Test.hs
--- a/test/Test.hs
+++ b/test/Test.hs
@@ -28,6 +28,6 @@
     res <- parseRoute "sample.route"
     res @?= ans
   where
-    ans = [Block ["localhost","www.example.com"] [RouteCGI "/~alice/cgi-bin/" "/home/alice/public_html/cgi-bin/",RouteFile "/~alice/" "/home/alice/public_html/",RouteCGI "/cgi-bin/" "/export/cgi-bin/",RouteRevProxy "/app/cal" "/calendar" "example.net" 80,RouteRevProxy "/app/wiki" "/app/wiki" "localhost" 8080,RouteFile "/" "/export/www/"]]
+    ans = [Block ["localhost","www.example.com"] [RouteCGI "/~alice/cgi-bin/" "/home/alice/public_html/cgi-bin/",RouteFile "/~alice/" "/home/alice/public_html/",RouteCGI "/cgi-bin/" "/export/cgi-bin/",RouteRevProxy "/app/cal/" "/calendar/" "example.net" 80,RouteRevProxy "/app/wiki/" "/" "127.0.0.1" 8080,RouteFile "/" "/export/www/"]]
 
 ----------------------------------------------------------------
