diff --git a/trac/web/chrome.py b/trac/web/chrome.py
--- a/trac/web/chrome.py
+++ b/trac/web/chrome.py
@@ -484,7 +484,7 @@
                     href = category_section.get(name + '.href')
                     if href:
                         if href.startswith('/'):
-                            href = req.href() + href
+                            href = req.href().rstrip('/') + href
                         if label:
                             item = tag.a(label) # create new label
                         elif not item:
diff --git a/trac/web/main.py b/trac/web/main.py
--- a/trac/web/main.py
+++ b/trac/web/main.py
@@ -181,7 +181,8 @@
                         target = req.path_info.rstrip('/').encode('utf-8')
                         if req.query_string:
                             target += '?' + req.query_string
-                        req.redirect(req.href() + target, permanent=True)
+                        req.redirect(req.href().rstrip('/') + target,
+                                     permanent=True)
                     raise HTTPNotFound('No handler matched request to %s',
                                        req.path_info)
 

