diff --git a/Panda/Config/Global.hs b/Panda/Config/Global.hs
--- a/Panda/Config/Global.hs
+++ b/Panda/Config/Global.hs
@@ -1,7 +1,15 @@
 module Panda.Config.Global where
 
-import Panda.Helper.Env
+import Panda.Helper.Helper
+import MPS
 import Prelude hiding ((.), (/), (^), id, readFile)
+
+import System.FilePath hiding ((<.>))
+import System.IO.UTF8 (readFile, writeFile)
+import Control.Arrow ((>>>), (&&&), (***))
+import Data.Maybe
+import System.Directory
+
 import Panda.Type.Reader
 import Panda.Type.Sidebar
 import Panda.Type.Theme
@@ -44,6 +52,10 @@
 navigation      = config_for' "navigation" "About" .parse_config.("Home" :)
 
 panda_url       = "http://github.com/nfjinjing/panda"
+root            
+  | user_root.belongs_to ["/", ""]  = "/"
+  | otherwise                       =  user_root.("/" /).remove_trailing_slash
+  where user_root = config_for' "root" "/"
 
 default_reader  = Markdown
 
diff --git a/Panda/Controller/Application.hs b/Panda/Controller/Application.hs
--- a/Panda/Controller/Application.hs
+++ b/Panda/Controller/Application.hs
@@ -13,6 +13,7 @@
 
 -- env
 import Panda.Helper.Env hiding (tag)
+import Panda.Helper.StateHelper
 import Prelude hiding ((.), (/), (^), id)
 import qualified Panda.Type.State as S
 import qualified Panda.Config.Global as G
@@ -32,22 +33,26 @@
 import qualified Panda.View.Control.Search as SearchV
 import qualified Panda.View.Widget.RSS as RSSV
 
-blog_regex = "^/[0-9][0-9]-[0-9][0-9]-[0-9][0-9]"
-  
+per_page = G.per_page
+root     = G.root
+
+blog_regex = "[0-9][0-9]-[0-9][0-9]-[0-9][0-9]"
 pages = 
-  [ ("^/$"                  ,index             )
-  , ("^/([?].+$)?$"         ,index             )
-  , ("^/rss.xml$"           ,index_feed        )
-  , (blog_regex             ,blog              )
-  , ("^/static/."           ,static            )
-  , ("^/tag/.*/rss.xml$"    ,tag_feed          )
-  , ("^/tag/."              ,tag               )
-  , ("^/search"             ,search            )
-  , ("^/comment/create"     ,comment_create    )
-  ]
+  [ ("$"                  ,index             )
+  , ("([?].+$)?$"         ,index             )
+  , ("rss.xml$"           ,index_feed        )
+  , (blog_regex           ,blog              )
+  , ("static/."           ,static            )
+  , ("tag/.*/rss.xml$"    ,tag_feed          )
+  , ("tag/."              ,tag               )
+  , ("search"             ,search            )
+  , ("comment/create"     ,comment_create    )
+  ] .map_fst ((root /) >>> ("^" ++))
+  ++
+  [ ("^" ++ root ++ "$"          ,index      )]
 
-per_page = G.per_page
 
+
 index = do
   blogs <- Post.list.liftIO
   p <- paginate per_page $ blogs.length
@@ -64,7 +69,7 @@
   blogs.RSSV.rss "" "" .output
 
 blog = do
-  id <- uri ^ ("blog/" ++)
+  id <- uri ^ ( "blog" / )
   blog <- Post.get id .liftIO
   comments <- Comment.list_for id .liftIO
   tags <- Tag.list.liftIO
@@ -131,7 +136,7 @@
       inputs >>= (Comment.create >>> liftIO)
     else
       return ()
-  redirect $ ("/" ++ post_id.id_to_resource.to_utf8).urlEncode
+  redirect $ (G.root / post_id.id_to_resource.to_utf8).urlEncode
 
 
 -- create helper, should be refactored to some common aspect
diff --git a/Panda/Helper/Helper.hs b/Panda/Helper/Helper.hs
--- a/Panda/Helper/Helper.hs
+++ b/Panda/Helper/Helper.hs
@@ -19,6 +19,7 @@
 import Prelude hiding ((.), (/), (^), id)
 import Char
 import Data.List
+import qualified Data.List as L 
 import Panda.Type.Reader
 import System.FilePath.Posix hiding ((<.>))
 
@@ -32,8 +33,8 @@
 take_extension = takeExtension >>> split "\\." >>> last
 
 -- controller
-uri = requestURI ^ (uriPath >>> urlDecode >>> tail >>> remove_trailing_slash >>> from_utf8 )
-  where remove_trailing_slash s = if s.last.is '/' then s.init else s
+raw_uri = requestURI ^ (uriPath >>> urlDecode >>> tail >>> remove_trailing_slash >>> from_utf8 )
+remove_trailing_slash s = if s.last.is '/' then s.init else s
 
 params = do
   query_string <- requestURI ^ uriQuery 
diff --git a/Panda/Helper/StateHelper.hs b/Panda/Helper/StateHelper.hs
new file mode 100644
--- /dev/null
+++ b/Panda/Helper/StateHelper.hs
@@ -0,0 +1,18 @@
+{-# OPTIONS -fno-monomorphism-restriction #-}
+
+module Panda.Helper.StateHelper where
+
+import Panda.Helper.Env
+import qualified Panda.Config.Global as G
+import Prelude hiding ((.), (/), (^), id)
+
+-- G.root = /blog
+-- raw_uri = blog/x
+-- full_uri = /blog/x
+-- uri = full_uri - (/blog/)
+remove_root s
+  | G.root.is "/" = s
+  | otherwise     = s.slice (G.root.length) (s.length)
+
+uri = raw_uri ^ remove_root
+-- uri = raw_uri
diff --git a/Panda/View/Atom/Comment.hs b/Panda/View/Atom/Comment.hs
--- a/Panda/View/Atom/Comment.hs
+++ b/Panda/View/Atom/Comment.hs
@@ -2,6 +2,7 @@
   
 import Panda.Helper.Env hiding (title, date)
 import Prelude hiding ((.), (/), (^), id, span)
+import qualified Panda.Config.Global as G
 
 -- view
 import qualified Panda.View.Atom.Tag as Tag
@@ -31,7 +32,7 @@
 
 create x = toHtml
   [ h2 ! [id "respond"] << "Leave a Response"
-  , gui "/comment/create" ! [id "commentform"] <<
+  , gui (G.root / "comment/create") ! [id "commentform"] <<
     [ field "author" 22 1 "Name (required)"
     , field "url" 22 2 "Website"
     , field "human-hack" 22 3 "What is 5 + 5 ?"
diff --git a/Panda/View/Atom/Post.hs b/Panda/View/Atom/Post.hs
--- a/Panda/View/Atom/Post.hs
+++ b/Panda/View/Atom/Post.hs
@@ -2,6 +2,7 @@
   
 import Panda.Helper.Env hiding (name, title, date)
 import Prelude hiding ((.), (/), (^), id, span)
+import qualified Panda.Config.Global as G
 
 -- view
 import qualified Panda.View.Atom.Tag as Tag
@@ -20,11 +21,11 @@
   entry_mark  = p ! [theclass "small"] << [ blog_date, blog_tags, blog_comments ].map (send_to x)
 
 title_link x              = h2 << hotlink (entry_uri x) << x.title
-entry_uri x               = "/" ++ uid x .id_to_resource
+entry_uri x               = G.root / ( uid x .id_to_resource )
 blog_date x               = toHtml $ x.date.formatCalendarTime defaultTimeLocale "%b %e, %Y"
 
 blog_tags x | x.tags.null = toHtml ""
 blog_tags x = " | " +++ "Published in " +++ x.tags.map Tag.tag_link .intersperse (", ".toHtml)
 
 blog_comments x | x.comment_size.is 0 = toHtml ""
-blog_comments x = " | " +++ hotlink (entry_uri x / "#comments") << (x.comment_size.show ++ " Comments")
+blog_comments x = " | " +++ hotlink ( entry_uri x / "#comments") << (x.comment_size.show ++ " Comments")
diff --git a/Panda/View/Atom/Tag.hs b/Panda/View/Atom/Tag.hs
--- a/Panda/View/Atom/Tag.hs
+++ b/Panda/View/Atom/Tag.hs
@@ -2,9 +2,11 @@
   
 import Panda.Helper.Env hiding (name)
 import Panda.Model.Tag
+import qualified Panda.Config.Global as G
+import Prelude hiding ((/))
 
 instance DataRenderer Tag where
   render_data = name >>> tag_link
 
-tag_link s = toHtml $ hotlink ("/tag/" ++ s ) << s 
+tag_link s = toHtml $ hotlink (G.root / "tag" / s ) << s 
 
diff --git a/Panda/View/Control/Helper.hs b/Panda/View/Control/Helper.hs
--- a/Panda/View/Control/Helper.hs
+++ b/Panda/View/Control/Helper.hs
@@ -4,6 +4,7 @@
 import Prelude hiding ((.), (/), (^), id, span)
   
 import Panda.Type.Pager as Pager
+import qualified Panda.Config.Global as G
 
 
 nav p r = 
@@ -12,12 +13,12 @@
   ]
   
 nav_previous p r = if p.Pager.has_previous 
-  then toHtml $ hotlink ( r' ++ "page=" ++ p.Pager.previous.show ) << previous_sign
+  then toHtml $ hotlink ( G.root ++ r' ++ "page=" ++ p.Pager.previous.show ) << previous_sign
   else spaceHtml
   where r' = if isSuffixOf "&" r then r else r ++ "?"
     
 nav_next p r = if p.Pager.has_next
-  then toHtml $ hotlink ( r' ++ "page=" ++ p.Pager.next.show ) << next_sign
+  then toHtml $ hotlink ( G.root ++ r' ++ "page=" ++ p.Pager.next.show ) << next_sign
   else spaceHtml
   where r' = if isSuffixOf "&" r then r else r ++ "?"
 
diff --git a/Panda/View/Control/Search.hs b/Panda/View/Control/Search.hs
--- a/Panda/View/Control/Search.hs
+++ b/Panda/View/Control/Search.hs
@@ -3,12 +3,13 @@
 import Panda.Helper.Env
 import Prelude hiding ((.), (/), (^), id, span)
 import qualified Panda.Type.State as State
+import qualified Panda.Config.Global as G
 
 -- view
 import Panda.View.Atom.Post
 import Panda.View.Control.Helper
 import Panda.View.Widget.Template
 
-view state s = for_current_page p >>> map render_data >>> (+++ nav p ("/search" ++ "?s=" ++ s ++ "&")) >>> page state
+view state s = for_current_page p >>> map render_data >>> (+++ nav p ( (G.root / "search") ++ "?s=" ++ s ++ "&")) >>> page state
   where p = state.State.pager
 
diff --git a/Panda/View/Control/Tag.hs b/Panda/View/Control/Tag.hs
--- a/Panda/View/Control/Tag.hs
+++ b/Panda/View/Control/Tag.hs
@@ -3,13 +3,15 @@
 import Panda.Helper.Env
 import Prelude hiding ((.), (/), (^), id, span)
 import qualified Panda.Type.State as State
+import qualified Panda.Config.Global as G
 
 -- view
 import Panda.View.Atom.Post
 import Panda.View.Control.Helper
 import Panda.View.Widget.Template
 
-view state = for_current_page p >>> map render_data >>> (+++ nav p ("/" ++ tag_id)) >>> page state
+
+view state = for_current_page p >>> map render_data >>> (+++ nav p ( G.root / tag_id)) >>> page state
   where p = state.State.pager
         tag_id = state.State.uid
 
diff --git a/Panda/View/Widget/Header.hs b/Panda/View/Widget/Header.hs
--- a/Panda/View/Widget/Header.hs
+++ b/Panda/View/Widget/Header.hs
@@ -12,7 +12,7 @@
     ]
 
 site_name = toHtml $
-  [ toHtml $ hotlink "/" ! [theclass "logo"] << ""
+  [ toHtml $ hotlink G.root ! [theclass "logo"] << ""
   , h1 << G.blog_title
   , div_class "description" << G.blog_subtitle
   ]
diff --git a/Panda/View/Widget/Navigation.hs b/Panda/View/Widget/Navigation.hs
--- a/Panda/View/Widget/Navigation.hs
+++ b/Panda/View/Widget/Navigation.hs
@@ -15,5 +15,5 @@
   current = if s == nav then " current_page_item" else ""
   link x = if x == home_nav then home_link else static_link x
 
-home_link     = hotlink "/" << home_nav
-static_link s = hotlink ("/" / "static" / s) << s.dropExtension
+home_link     = hotlink G.root << home_nav
+static_link s = hotlink (G.root / "static" / s) << s.dropExtension
diff --git a/Panda/View/Widget/RSS.hs b/Panda/View/Widget/RSS.hs
--- a/Panda/View/Widget/RSS.hs
+++ b/Panda/View/Widget/RSS.hs
@@ -12,7 +12,7 @@
 import Panda.Model.Post as Post
 
 
-entry_uri x = "/" ++ Post.uid x.split "/".tail.join "/"
+entry_uri x = G.root ++ Post.uid x.split "/".tail.join "/"
 
 -- RSS
 channel_rss_template = [ RSS.Language "en-us" ]
@@ -26,11 +26,11 @@
   ]
 
 item_uri x = nullURI { uriScheme = "http://", uriPath = G.host_name ++ x.entry_uri }
-rss_uri x  = nullURI { uriScheme = "http://", uriPath = x / "rss.xml" }
+rss_uri x  = nullURI { uriScheme = "http://", uriPath = G.root / x / "rss.xml" }
 
 rss categary s xs = RSS title  (rss_uri link) title channel_rss_template (xs.take 20 .map item_rss_template)
   .rssToXML.showXML
   where 
-    link =  G.host_name / categary / s
+    link =  G.host_name / G.root / categary / s
     title = G.blog_title ++ " / " ++ s
   
diff --git a/Panda/View/Widget/SearchBar.hs b/Panda/View/Widget/SearchBar.hs
--- a/Panda/View/Widget/SearchBar.hs
+++ b/Panda/View/Widget/SearchBar.hs
@@ -1,5 +1,7 @@
 module Panda.View.Widget.SearchBar where
   
 import Panda.Helper.Env hiding (header)
+import qualified Panda.Config.Global as G
+import Prelude hiding ((/))
 
-search_bar = div_id "search" << form ! [action "/search", method "get"] << thediv << textfield "s"
+search_bar = div_id "search" << form ! [action (G.root / "search"), method "get"] << thediv << textfield "s"
diff --git a/Panda/View/Widget/Sidebar.hs b/Panda/View/Widget/Sidebar.hs
--- a/Panda/View/Widget/Sidebar.hs
+++ b/Panda/View/Widget/Sidebar.hs
@@ -32,15 +32,15 @@
   if tagged 
   then
     let tag_name = Tag.get_name uid in
-      link ("tag" / tag_name) tag_name
+      link ( "tag" / tag_name) tag_name
   else link "" "Home"
   where
     uid = State.uid state
     tagged = uid.match "^tag/.+" .isJust
-    link r s = hotlink ("/" / r / "rss.xml") ! [ theclass "feedlink" ] << s
+    link r s = hotlink (G.root / r / "rss.xml") ! [ theclass "feedlink" ] << s
 
 tag_list tags = toHtml
   [ h2 << "Tags"
   , unordList $ tags.Tag.sorted.map tag_link]
   
-tag_link x = ( hotlink ("/" ++ x.Tag.uid) << x.Tag.name ) +++ ( " (" ++ x.Tag.resources.Set.size.show ++ ")" )
+tag_link x = ( hotlink (G.root / x.Tag.uid) << x.Tag.name ) +++ ( " (" ++ x.Tag.resources.Set.size.show ++ ")" )
diff --git a/changelog.markdown b/changelog.markdown
--- a/changelog.markdown
+++ b/changelog.markdown
@@ -1,3 +1,10 @@
+2008.10.13
+-----------
+
+### Feature
+
+* configurable root_path for `hostname/blog`  
+
 2008.10.12
 ----------
 
diff --git a/panda.cabal b/panda.cabal
--- a/panda.cabal
+++ b/panda.cabal
@@ -1,5 +1,5 @@
 Name:                 panda
-Version:              2008.10.12
+Version:              2008.10.13
 Build-type:           Simple
 Synopsis:             A simple static blog engine
 Description:          A simple static blog engine
@@ -24,6 +24,7 @@
 
                     Panda.Helper.Env
                     Panda.Helper.Helper
+                    Panda.Helper.StateHelper
 
                     Panda.Model.Comment
                     Panda.Model.Post
