Repository: getpelican/pelican

Issue:
Change default setting for RELATIVE_URLS to False
The default value for RELATIVE_URLS is currently set to `True`, which is the source of a considerable amount of confusion and unexpected side effects.

This issue tracks modification of this setting to `False` by default, while ensuring that tests pass and that this change does not cause any unanticipated negative behavior.



Discussion:
I was affected by this, as I expected `SITEURL` to work in production. Upon inspection and 1.5 hours of lost time, I found that setting `RELATIVE_URLS=False` to fix this. Support action to make `False` the default value for `RELATIVE_URLS` for the reason of least surprise.


Resolving patch:
diff --git a/pelican/settings.py b/pelican/settings.py
--- a/pelican/settings.py
+++ b/pelican/settings.py
@@ -66,7 +66,7 @@
                    'YEAR_ARCHIVE_SAVE_AS': False,
                    'MONTH_ARCHIVE_SAVE_AS': False,
                    'DAY_ARCHIVE_SAVE_AS': False,
-                   'RELATIVE_URLS': True,
+                   'RELATIVE_URLS': False,
                    'DEFAULT_LANG': 'en',
                    'TAG_CLOUD_STEPS': 4,
                    'TAG_CLOUD_MAX_ITEMS': 100,
diff --git a/pelican/writers.py b/pelican/writers.py
--- a/pelican/writers.py
+++ b/pelican/writers.py
@@ -89,7 +89,7 @@ def write_feed(self, elements, context, path=None, feed_type='atom'):
         finally:
             locale.setlocale(locale.LC_ALL, old_locale)
 
-    def write_file(self, name, template, context, relative_urls=True,
+    def write_file(self, name, template, context, relative_urls=False,
         paginated=None, **kwargs):
         """Render the template and write the file.
 
diff --git a/samples/pelican.conf.py b/samples/pelican.conf.py
--- a/samples/pelican.conf.py
+++ b/samples/pelican.conf.py
@@ -6,6 +6,9 @@
 SITEURL = 'http://blog.notmyidea.org'
 TIMEZONE = "Europe/Paris"
 
+# can be useful in development, but set to False when you're ready to publish
+RELATIVE_URLS = True
+
 GITHUB_URL = 'http://github.com/ametaireau/'
 DISQUS_SITENAME = "blog-notmyidea"
 PDF_GENERATOR = False


Test patch:
diff --git a/pelican/tests/output/basic/a-markdown-powered-article.html b/pelican/tests/output/basic/a-markdown-powered-article.html
--- a/pelican/tests/output/basic/a-markdown-powered-article.html
+++ b/pelican/tests/output/basic/a-markdown-powered-article.html
@@ -3,38 +3,38 @@
 <head>
         <title>A markdown powered article</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li class="active"><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li class="active"><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./a-markdown-powered-article.html" rel="bookmark"
+        <a href="/a-markdown-powered-article.html" rel="bookmark"
            title="Permalink to A markdown powered article">A markdown powered article</a></h1>
           </header>
 
@@ -44,11 +44,11 @@ <h1 class="entry-title">
                 Wed 20 April 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->      <p>You're mutually oblivious.</p>
-<p><a href="./unbelievable.html">a root-relative link to unbelievable</a>
-<a href="./unbelievable.html">a file-relative link to unbelievable</a></p>
+<p><a href="/unbelievable.html">a root-relative link to unbelievable</a>
+<a href="/unbelievable.html">a file-relative link to unbelievable</a></p>
     </div><!-- /.entry-content -->
     
   </article>
diff --git a/pelican/tests/output/basic/archives.html b/pelican/tests/output/basic/archives.html
--- a/pelican/tests/output/basic/archives.html
+++ b/pelican/tests/output/basic/archives.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
@@ -35,23 +35,23 @@ <h1>Archives for A Pelican Blog</h1>
 
 <dl>
     <dt>Fri 30 November 2012</dt>
-    <dd><a href="./filename_metadata-example.html">FILENAME_METADATA example</a></dd>
+    <dd><a href="/filename_metadata-example.html">FILENAME_METADATA example</a></dd>
     <dt>Wed 29 February 2012</dt>
-    <dd><a href="./second-article.html">Second article</a></dd>
+    <dd><a href="/second-article.html">Second article</a></dd>
     <dt>Wed 20 April 2011</dt>
-    <dd><a href="./a-markdown-powered-article.html">A markdown powered article</a></dd>
+    <dd><a href="/a-markdown-powered-article.html">A markdown powered article</a></dd>
     <dt>Thu 17 February 2011</dt>
-    <dd><a href="./article-1.html">Article 1</a></dd>
+    <dd><a href="/article-1.html">Article 1</a></dd>
     <dt>Thu 17 February 2011</dt>
-    <dd><a href="./article-2.html">Article 2</a></dd>
+    <dd><a href="/article-2.html">Article 2</a></dd>
     <dt>Thu 17 February 2011</dt>
-    <dd><a href="./article-3.html">Article 3</a></dd>
+    <dd><a href="/article-3.html">Article 3</a></dd>
     <dt>Thu 02 December 2010</dt>
-    <dd><a href="./this-is-a-super-article.html">This is a super article !</a></dd>
+    <dd><a href="/this-is-a-super-article.html">This is a super article !</a></dd>
     <dt>Wed 20 October 2010</dt>
-    <dd><a href="./oh-yeah.html">Oh yeah !</a></dd>
+    <dd><a href="/oh-yeah.html">Oh yeah !</a></dd>
     <dt>Fri 15 October 2010</dt>
-    <dd><a href="./unbelievable.html">Unbelievable !</a></dd>
+    <dd><a href="/unbelievable.html">Unbelievable !</a></dd>
 </dl>
 </section>
         <section id="extras" class="body">
diff --git a/pelican/tests/output/basic/article-1.html b/pelican/tests/output/basic/article-1.html
--- a/pelican/tests/output/basic/article-1.html
+++ b/pelican/tests/output/basic/article-1.html
@@ -3,38 +3,38 @@
 <head>
         <title>Article 1</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li class="active"><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li class="active"><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./article-1.html" rel="bookmark"
+        <a href="/article-1.html" rel="bookmark"
            title="Permalink to Article 1">Article 1</a></h1>
           </header>
 
@@ -44,7 +44,7 @@ <h1 class="entry-title">
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->      <p>Article 1</p>
 
diff --git a/pelican/tests/output/basic/article-2.html b/pelican/tests/output/basic/article-2.html
--- a/pelican/tests/output/basic/article-2.html
+++ b/pelican/tests/output/basic/article-2.html
@@ -3,38 +3,38 @@
 <head>
         <title>Article 2</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li class="active"><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li class="active"><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./article-2.html" rel="bookmark"
+        <a href="/article-2.html" rel="bookmark"
            title="Permalink to Article 2">Article 2</a></h1>
           </header>
 
@@ -44,7 +44,7 @@ <h1 class="entry-title">
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->      <p>Article 2</p>
 
diff --git a/pelican/tests/output/basic/article-3.html b/pelican/tests/output/basic/article-3.html
--- a/pelican/tests/output/basic/article-3.html
+++ b/pelican/tests/output/basic/article-3.html
@@ -3,38 +3,38 @@
 <head>
         <title>Article 3</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li class="active"><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li class="active"><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./article-3.html" rel="bookmark"
+        <a href="/article-3.html" rel="bookmark"
            title="Permalink to Article 3">Article 3</a></h1>
           </header>
 
@@ -44,7 +44,7 @@ <h1 class="entry-title">
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->      <p>Article 3</p>
 
diff --git a/pelican/tests/output/basic/author/alexis-metaireau.html b/pelican/tests/output/basic/author/alexis-metaireau.html
--- a/pelican/tests/output/basic/author/alexis-metaireau.html
+++ b/pelican/tests/output/basic/author/alexis-metaireau.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - Alexis Métaireau</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,17 +35,17 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../oh-yeah.html">Oh yeah !</a></h1> 
+                    <h1 class="entry-title"><a href="/oh-yeah.html">Oh yeah !</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2010-10-20T10:14:00">
                 Wed 20 October 2010
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/bar.html">bar</a>. </p>
-<p>tags: <a href="../tag/oh.html">oh</a><a href="../tag/bar.html">bar</a><a href="../tag/yeah.html">yeah</a></p>
+        <p>In <a href="/category/bar.html">bar</a>. </p>
+<p>tags: <a href="/tag/oh.html">oh</a><a href="/tag/bar.html">bar</a><a href="/tag/yeah.html">yeah</a></p>
 </footer><!-- /.post-info --><div class="section" id="why-not">
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
@@ -63,7 +63,7 @@ <h1>Other articles</h1>
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../this-is-a-super-article.html" rel="bookmark"
+                    <h1><a href="/this-is-a-super-article.html" rel="bookmark"
                            title="Permalink to This is a super article !">This is a super article !</a></h1>
                 </header>
                 
@@ -74,14 +74,14 @@ <h1><a href="../this-is-a-super-article.html" rel="bookmark"
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/yeah.html">yeah</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/foobar.html">foobar</a></p>
+        <p>In <a href="/category/yeah.html">yeah</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/foobar.html">foobar</a></p>
 </footer><!-- /.post-info -->                <p class="first last">Multi-line metadata should be supported
 as well as <strong>inline markup</strong>.</p>
 
-                <a class="readmore" href="../this-is-a-super-article.html">read more</a>
+                <a class="readmore" href="/this-is-a-super-article.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             </ol><!-- /#posts-list -->
diff --git a/pelican/tests/output/basic/categories.html b/pelican/tests/output/basic/categories.html
--- a/pelican/tests/output/basic/categories.html
+++ b/pelican/tests/output/basic/categories.html
@@ -3,38 +3,38 @@
 <head>
         <title>A Pelican Blog</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <ul>
-    <li><a href="./category/bar.html">bar</a></li>
-    <li><a href="./category/cat1.html">cat1</a></li>
-    <li><a href="./category/misc.html">misc</a></li>
-    <li><a href="./category/yeah.html">yeah</a></li>
+    <li><a href="/category/bar.html">bar</a></li>
+    <li><a href="/category/cat1.html">cat1</a></li>
+    <li><a href="/category/misc.html">misc</a></li>
+    <li><a href="/category/yeah.html">yeah</a></li>
 </ul>
         <section id="extras" class="body">
                                 <div class="social">
diff --git a/pelican/tests/output/basic/category/bar.html b/pelican/tests/output/basic/category/bar.html
--- a/pelican/tests/output/basic/category/bar.html
+++ b/pelican/tests/output/basic/category/bar.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - bar</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li class="active"><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li class="active"><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,17 +35,17 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../oh-yeah.html">Oh yeah !</a></h1> 
+                    <h1 class="entry-title"><a href="/oh-yeah.html">Oh yeah !</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2010-10-20T10:14:00">
                 Wed 20 October 2010
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/bar.html">bar</a>. </p>
-<p>tags: <a href="../tag/oh.html">oh</a><a href="../tag/bar.html">bar</a><a href="../tag/yeah.html">yeah</a></p>
+        <p>In <a href="/category/bar.html">bar</a>. </p>
+<p>tags: <a href="/tag/oh.html">oh</a><a href="/tag/bar.html">bar</a><a href="/tag/yeah.html">yeah</a></p>
 </footer><!-- /.post-info --><div class="section" id="why-not">
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
diff --git a/pelican/tests/output/basic/category/cat1.html b/pelican/tests/output/basic/category/cat1.html
--- a/pelican/tests/output/basic/category/cat1.html
+++ b/pelican/tests/output/basic/category/cat1.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - cat1</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li class="active"><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li class="active"><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,17 +35,17 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../a-markdown-powered-article.html">A markdown powered article</a></h1> 
+                    <h1 class="entry-title"><a href="/a-markdown-powered-article.html">A markdown powered article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2011-04-20T00:00:00">
                 Wed 20 April 2011
         </abbr>
 
-        <p>In <a href="../category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info --><p>You're mutually oblivious.</p>
-<p><a href="../unbelievable.html">a root-relative link to unbelievable</a>
-<a href="../unbelievable.html">a file-relative link to unbelievable</a></p>                </article>
+<p><a href="/unbelievable.html">a root-relative link to unbelievable</a>
+<a href="/unbelievable.html">a file-relative link to unbelievable</a></p>                </article>
                             </aside><!-- /#featured -->
                             <section id="content" class="body">
                     <h1>Other articles</h1>
@@ -56,7 +56,7 @@ <h1>Other articles</h1>
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../article-1.html" rel="bookmark"
+                    <h1><a href="/article-1.html" rel="bookmark"
                            title="Permalink to Article 1">Article 1</a></h1>
                 </header>
                 
@@ -66,11 +66,11 @@ <h1><a href="../article-1.html" rel="bookmark"
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="../category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Article 1</p>
 
-                <a class="readmore" href="../article-1.html">read more</a>
+                <a class="readmore" href="/article-1.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -78,7 +78,7 @@ <h1><a href="../article-1.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../article-2.html" rel="bookmark"
+                    <h1><a href="/article-2.html" rel="bookmark"
                            title="Permalink to Article 2">Article 2</a></h1>
                 </header>
                 
@@ -88,11 +88,11 @@ <h1><a href="../article-2.html" rel="bookmark"
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="../category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Article 2</p>
 
-                <a class="readmore" href="../article-2.html">read more</a>
+                <a class="readmore" href="/article-2.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -100,7 +100,7 @@ <h1><a href="../article-2.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../article-3.html" rel="bookmark"
+                    <h1><a href="/article-3.html" rel="bookmark"
                            title="Permalink to Article 3">Article 3</a></h1>
                 </header>
                 
@@ -110,11 +110,11 @@ <h1><a href="../article-3.html" rel="bookmark"
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="../category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Article 3</p>
 
-                <a class="readmore" href="../article-3.html">read more</a>
+                <a class="readmore" href="/article-3.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             </ol><!-- /#posts-list -->
diff --git a/pelican/tests/output/basic/category/misc.html b/pelican/tests/output/basic/category/misc.html
--- a/pelican/tests/output/basic/category/misc.html
+++ b/pelican/tests/output/basic/category/misc.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - misc</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li class="active"><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li class="active"><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,13 +35,13 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../filename_metadata-example.html">FILENAME_METADATA example</a></h1> 
+                    <h1 class="entry-title"><a href="/filename_metadata-example.html">FILENAME_METADATA example</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-11-30T00:00:00">
                 Fri 30 November 2012
         </abbr>
 
-        <p>In <a href="../category/misc.html">misc</a>. </p>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
 
 </footer><!-- /.post-info --><p>Some cool stuff!</p>
                 </article>
@@ -55,7 +55,7 @@ <h1>Other articles</h1>
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../second-article.html" rel="bookmark"
+                    <h1><a href="/second-article.html" rel="bookmark"
                            title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
@@ -65,13 +65,13 @@ <h1><a href="../second-article.html" rel="bookmark"
                 Wed 29 February 2012
         </abbr>
 
-        <p>In <a href="../category/misc.html">misc</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/baz.html">baz</a></p>Translations: 
-            <a href="../second-article-fr.html">fr</a>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/baz.html">baz</a></p>Translations: 
+            <a href="/second-article-fr.html">fr</a>
     
 </footer><!-- /.post-info -->                <p>This is some article, in english</p>
 
-                <a class="readmore" href="../second-article.html">read more</a>
+                <a class="readmore" href="/second-article.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -79,7 +79,7 @@ <h1><a href="../second-article.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../unbelievable.html" rel="bookmark"
+                    <h1><a href="/unbelievable.html" rel="bookmark"
                            title="Permalink to Unbelievable !">Unbelievable !</a></h1>
                 </header>
                 
@@ -89,13 +89,13 @@ <h1><a href="../unbelievable.html" rel="bookmark"
                 Fri 15 October 2010
         </abbr>
 
-        <p>In <a href="../category/misc.html">misc</a>. </p>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Or completely awesome. Depends the needs.</p>
-<p><a class="reference external" href="../a-markdown-powered-article.html">a root-relative link to markdown-article</a>
-<a class="reference external" href="../a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
+<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
+<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
 
-                <a class="readmore" href="../unbelievable.html">read more</a>
+                <a class="readmore" href="/unbelievable.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             </ol><!-- /#posts-list -->
diff --git a/pelican/tests/output/basic/category/yeah.html b/pelican/tests/output/basic/category/yeah.html
--- a/pelican/tests/output/basic/category/yeah.html
+++ b/pelican/tests/output/basic/category/yeah.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - yeah</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li class="active"><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li class="active"><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,17 +35,17 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../this-is-a-super-article.html">This is a super article !</a></h1> 
+                    <h1 class="entry-title"><a href="/this-is-a-super-article.html">This is a super article !</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2010-12-02T10:14:00">
                 Thu 02 December 2010
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/yeah.html">yeah</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/foobar.html">foobar</a></p>
+        <p>In <a href="/category/yeah.html">yeah</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/foobar.html">foobar</a></p>
 </footer><!-- /.post-info --><p>Some content here !</p>
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
diff --git a/pelican/tests/output/basic/filename_metadata-example.html b/pelican/tests/output/basic/filename_metadata-example.html
--- a/pelican/tests/output/basic/filename_metadata-example.html
+++ b/pelican/tests/output/basic/filename_metadata-example.html
@@ -3,38 +3,38 @@
 <head>
         <title>FILENAME_METADATA example</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li class="active"><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li class="active"><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./filename_metadata-example.html" rel="bookmark"
+        <a href="/filename_metadata-example.html" rel="bookmark"
            title="Permalink to FILENAME_METADATA example">FILENAME_METADATA example</a></h1>
           </header>
 
@@ -44,7 +44,7 @@ <h1 class="entry-title">
                 Fri 30 November 2012
         </abbr>
 
-        <p>In <a href="./category/misc.html">misc</a>. </p>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
 
 </footer><!-- /.post-info -->      <p>Some cool stuff!</p>
 
diff --git a/pelican/tests/output/basic/index.html b/pelican/tests/output/basic/index.html
--- a/pelican/tests/output/basic/index.html
+++ b/pelican/tests/output/basic/index.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,13 +35,13 @@ <h1><a href="./">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="./filename_metadata-example.html">FILENAME_METADATA example</a></h1> 
+                    <h1 class="entry-title"><a href="/filename_metadata-example.html">FILENAME_METADATA example</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-11-30T00:00:00">
                 Fri 30 November 2012
         </abbr>
 
-        <p>In <a href="./category/misc.html">misc</a>. </p>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
 
 </footer><!-- /.post-info --><p>Some cool stuff!</p>
                 </article>
@@ -55,7 +55,7 @@ <h1>Other articles</h1>
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./second-article.html" rel="bookmark"
+                    <h1><a href="/second-article.html" rel="bookmark"
                            title="Permalink to Second article">Second article</a></h1>
                 </header>
                 
@@ -65,13 +65,13 @@ <h1><a href="./second-article.html" rel="bookmark"
                 Wed 29 February 2012
         </abbr>
 
-        <p>In <a href="./category/misc.html">misc</a>. </p>
-<p>tags: <a href="./tag/foo.html">foo</a><a href="./tag/bar.html">bar</a><a href="./tag/baz.html">baz</a></p>Translations: 
-            <a href="./second-article-fr.html">fr</a>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/baz.html">baz</a></p>Translations: 
+            <a href="/second-article-fr.html">fr</a>
     
 </footer><!-- /.post-info -->                <p>This is some article, in english</p>
 
-                <a class="readmore" href="./second-article.html">read more</a>
+                <a class="readmore" href="/second-article.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -79,7 +79,7 @@ <h1><a href="./second-article.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./a-markdown-powered-article.html" rel="bookmark"
+                    <h1><a href="/a-markdown-powered-article.html" rel="bookmark"
                            title="Permalink to A markdown powered article">A markdown powered article</a></h1>
                 </header>
                 
@@ -89,12 +89,12 @@ <h1><a href="./a-markdown-powered-article.html" rel="bookmark"
                 Wed 20 April 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->                <p>You're mutually oblivious.</p>
-<p><a href="./unbelievable.html">a root-relative link to unbelievable</a>
-<a href="./unbelievable.html">a file-relative link to unbelievable</a></p>
-                <a class="readmore" href="./a-markdown-powered-article.html">read more</a>
+<p><a href="/unbelievable.html">a root-relative link to unbelievable</a>
+<a href="/unbelievable.html">a file-relative link to unbelievable</a></p>
+                <a class="readmore" href="/a-markdown-powered-article.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -102,7 +102,7 @@ <h1><a href="./a-markdown-powered-article.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./article-1.html" rel="bookmark"
+                    <h1><a href="/article-1.html" rel="bookmark"
                            title="Permalink to Article 1">Article 1</a></h1>
                 </header>
                 
@@ -112,11 +112,11 @@ <h1><a href="./article-1.html" rel="bookmark"
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Article 1</p>
 
-                <a class="readmore" href="./article-1.html">read more</a>
+                <a class="readmore" href="/article-1.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -124,7 +124,7 @@ <h1><a href="./article-1.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./article-2.html" rel="bookmark"
+                    <h1><a href="/article-2.html" rel="bookmark"
                            title="Permalink to Article 2">Article 2</a></h1>
                 </header>
                 
@@ -134,11 +134,11 @@ <h1><a href="./article-2.html" rel="bookmark"
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Article 2</p>
 
-                <a class="readmore" href="./article-2.html">read more</a>
+                <a class="readmore" href="/article-2.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -146,7 +146,7 @@ <h1><a href="./article-2.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./article-3.html" rel="bookmark"
+                    <h1><a href="/article-3.html" rel="bookmark"
                            title="Permalink to Article 3">Article 3</a></h1>
                 </header>
                 
@@ -156,11 +156,11 @@ <h1><a href="./article-3.html" rel="bookmark"
                 Thu 17 February 2011
         </abbr>
 
-        <p>In <a href="./category/cat1.html">cat1</a>. </p>
+        <p>In <a href="/category/cat1.html">cat1</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Article 3</p>
 
-                <a class="readmore" href="./article-3.html">read more</a>
+                <a class="readmore" href="/article-3.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -168,7 +168,7 @@ <h1><a href="./article-3.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./this-is-a-super-article.html" rel="bookmark"
+                    <h1><a href="/this-is-a-super-article.html" rel="bookmark"
                            title="Permalink to This is a super article !">This is a super article !</a></h1>
                 </header>
                 
@@ -179,14 +179,14 @@ <h1><a href="./this-is-a-super-article.html" rel="bookmark"
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="./category/yeah.html">yeah</a>. </p>
-<p>tags: <a href="./tag/foo.html">foo</a><a href="./tag/bar.html">bar</a><a href="./tag/foobar.html">foobar</a></p>
+        <p>In <a href="/category/yeah.html">yeah</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/foobar.html">foobar</a></p>
 </footer><!-- /.post-info -->                <p class="first last">Multi-line metadata should be supported
 as well as <strong>inline markup</strong>.</p>
 
-                <a class="readmore" href="./this-is-a-super-article.html">read more</a>
+                <a class="readmore" href="/this-is-a-super-article.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -194,7 +194,7 @@ <h1><a href="./this-is-a-super-article.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./oh-yeah.html" rel="bookmark"
+                    <h1><a href="/oh-yeah.html" rel="bookmark"
                            title="Permalink to Oh yeah !">Oh yeah !</a></h1>
                 </header>
                 
@@ -205,10 +205,10 @@ <h1><a href="./oh-yeah.html" rel="bookmark"
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="./category/bar.html">bar</a>. </p>
-<p>tags: <a href="./tag/oh.html">oh</a><a href="./tag/bar.html">bar</a><a href="./tag/yeah.html">yeah</a></p>
+        <p>In <a href="/category/bar.html">bar</a>. </p>
+<p>tags: <a href="/tag/oh.html">oh</a><a href="/tag/bar.html">bar</a><a href="/tag/yeah.html">yeah</a></p>
 </footer><!-- /.post-info -->                <div class="section" id="why-not">
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
@@ -216,7 +216,7 @@ <h2>Why not ?</h2>
 <img alt="alternate text" src="|filename|/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
 </div>
 
-                <a class="readmore" href="./oh-yeah.html">read more</a>
+                <a class="readmore" href="/oh-yeah.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -224,7 +224,7 @@ <h2>Why not ?</h2>
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="./unbelievable.html" rel="bookmark"
+                    <h1><a href="/unbelievable.html" rel="bookmark"
                            title="Permalink to Unbelievable !">Unbelievable !</a></h1>
                 </header>
                 
@@ -234,13 +234,13 @@ <h1><a href="./unbelievable.html" rel="bookmark"
                 Fri 15 October 2010
         </abbr>
 
-        <p>In <a href="./category/misc.html">misc</a>. </p>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
 
 </footer><!-- /.post-info -->                <p>Or completely awesome. Depends the needs.</p>
-<p><a class="reference external" href="./a-markdown-powered-article.html">a root-relative link to markdown-article</a>
-<a class="reference external" href="./a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
+<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
+<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
 
-                <a class="readmore" href="./unbelievable.html">read more</a>
+                <a class="readmore" href="/unbelievable.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             </ol><!-- /#posts-list -->
diff --git a/pelican/tests/output/basic/oh-yeah.html b/pelican/tests/output/basic/oh-yeah.html
--- a/pelican/tests/output/basic/oh-yeah.html
+++ b/pelican/tests/output/basic/oh-yeah.html
@@ -3,38 +3,38 @@
 <head>
         <title>Oh yeah !</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li class="active"><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li class="active"><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./oh-yeah.html" rel="bookmark"
+        <a href="/oh-yeah.html" rel="bookmark"
            title="Permalink to Oh yeah !">Oh yeah !</a></h1>
           </header>
 
@@ -45,10 +45,10 @@ <h1 class="entry-title">
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="./category/bar.html">bar</a>. </p>
-<p>tags: <a href="./tag/oh.html">oh</a><a href="./tag/bar.html">bar</a><a href="./tag/yeah.html">yeah</a></p>
+        <p>In <a href="/category/bar.html">bar</a>. </p>
+<p>tags: <a href="/tag/oh.html">oh</a><a href="/tag/bar.html">bar</a><a href="/tag/yeah.html">yeah</a></p>
 </footer><!-- /.post-info -->      <div class="section" id="why-not">
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
diff --git a/pelican/tests/output/basic/override/index.html b/pelican/tests/output/basic/override/index.html
--- a/pelican/tests/output/basic/override/index.html
+++ b/pelican/tests/output/basic/override/index.html
@@ -3,31 +3,31 @@
 <head>
         <title>Override url/save_as</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
diff --git a/pelican/tests/output/basic/pages/this-is-a-test-hidden-page.html b/pelican/tests/output/basic/pages/this-is-a-test-hidden-page.html
--- a/pelican/tests/output/basic/pages/this-is-a-test-hidden-page.html
+++ b/pelican/tests/output/basic/pages/this-is-a-test-hidden-page.html
@@ -3,31 +3,31 @@
 <head>
         <title>This is a test hidden page</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
diff --git a/pelican/tests/output/basic/pages/this-is-a-test-page.html b/pelican/tests/output/basic/pages/this-is-a-test-page.html
--- a/pelican/tests/output/basic/pages/this-is-a-test-page.html
+++ b/pelican/tests/output/basic/pages/this-is-a-test-page.html
@@ -3,31 +3,31 @@
 <head>
         <title>This is a test page</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
diff --git a/pelican/tests/output/basic/second-article-fr.html b/pelican/tests/output/basic/second-article-fr.html
--- a/pelican/tests/output/basic/second-article-fr.html
+++ b/pelican/tests/output/basic/second-article-fr.html
@@ -3,38 +3,38 @@
 <head>
         <title>Deuxième article</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li class="active"><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li class="active"><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./second-article-fr.html" rel="bookmark"
+        <a href="/second-article-fr.html" rel="bookmark"
            title="Permalink to Deuxième article">Deuxième article</a></h1>
           </header>
 
@@ -44,9 +44,9 @@ <h1 class="entry-title">
                 Wed 29 February 2012
         </abbr>
 
-        <p>In <a href="./category/misc.html">misc</a>. </p>
-<p>tags: <a href="./tag/foo.html">foo</a><a href="./tag/bar.html">bar</a><a href="./tag/baz.html">baz</a></p>Translations: 
-            <a href="./second-article.html">en</a>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/baz.html">baz</a></p>Translations: 
+            <a href="/second-article.html">en</a>
     
 </footer><!-- /.post-info -->      <p>Ceci est un article, en français.</p>
 
diff --git a/pelican/tests/output/basic/second-article.html b/pelican/tests/output/basic/second-article.html
--- a/pelican/tests/output/basic/second-article.html
+++ b/pelican/tests/output/basic/second-article.html
@@ -3,38 +3,38 @@
 <head>
         <title>Second article</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li class="active"><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li class="active"><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./second-article.html" rel="bookmark"
+        <a href="/second-article.html" rel="bookmark"
            title="Permalink to Second article">Second article</a></h1>
           </header>
 
@@ -44,9 +44,9 @@ <h1 class="entry-title">
                 Wed 29 February 2012
         </abbr>
 
-        <p>In <a href="./category/misc.html">misc</a>. </p>
-<p>tags: <a href="./tag/foo.html">foo</a><a href="./tag/bar.html">bar</a><a href="./tag/baz.html">baz</a></p>Translations: 
-            <a href="./second-article-fr.html">fr</a>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/baz.html">baz</a></p>Translations: 
+            <a href="/second-article-fr.html">fr</a>
     
 </footer><!-- /.post-info -->      <p>This is some article, in english</p>
 
diff --git a/pelican/tests/output/basic/tag/bar.html b/pelican/tests/output/basic/tag/bar.html
--- a/pelican/tests/output/basic/tag/bar.html
+++ b/pelican/tests/output/basic/tag/bar.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - bar</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,15 +35,15 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href="/second-article.html">Second article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
         </abbr>
 
-        <p>In <a href="../category/misc.html">misc</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/baz.html">baz</a></p>Translations: 
-            <a href="../second-article-fr.html">fr</a>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/baz.html">baz</a></p>Translations: 
+            <a href="/second-article-fr.html">fr</a>
     
 </footer><!-- /.post-info --><p>This is some article, in english</p>
                 </article>
@@ -57,7 +57,7 @@ <h1>Other articles</h1>
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../this-is-a-super-article.html" rel="bookmark"
+                    <h1><a href="/this-is-a-super-article.html" rel="bookmark"
                            title="Permalink to This is a super article !">This is a super article !</a></h1>
                 </header>
                 
@@ -68,14 +68,14 @@ <h1><a href="../this-is-a-super-article.html" rel="bookmark"
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/yeah.html">yeah</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/foobar.html">foobar</a></p>
+        <p>In <a href="/category/yeah.html">yeah</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/foobar.html">foobar</a></p>
 </footer><!-- /.post-info -->                <p class="first last">Multi-line metadata should be supported
 as well as <strong>inline markup</strong>.</p>
 
-                <a class="readmore" href="../this-is-a-super-article.html">read more</a>
+                <a class="readmore" href="/this-is-a-super-article.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             
@@ -83,7 +83,7 @@ <h1><a href="../this-is-a-super-article.html" rel="bookmark"
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../oh-yeah.html" rel="bookmark"
+                    <h1><a href="/oh-yeah.html" rel="bookmark"
                            title="Permalink to Oh yeah !">Oh yeah !</a></h1>
                 </header>
                 
@@ -94,10 +94,10 @@ <h1><a href="../oh-yeah.html" rel="bookmark"
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/bar.html">bar</a>. </p>
-<p>tags: <a href="../tag/oh.html">oh</a><a href="../tag/bar.html">bar</a><a href="../tag/yeah.html">yeah</a></p>
+        <p>In <a href="/category/bar.html">bar</a>. </p>
+<p>tags: <a href="/tag/oh.html">oh</a><a href="/tag/bar.html">bar</a><a href="/tag/yeah.html">yeah</a></p>
 </footer><!-- /.post-info -->                <div class="section" id="why-not">
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
@@ -105,7 +105,7 @@ <h2>Why not ?</h2>
 <img alt="alternate text" src="|filename|/pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
 </div>
 
-                <a class="readmore" href="../oh-yeah.html">read more</a>
+                <a class="readmore" href="/oh-yeah.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             </ol><!-- /#posts-list -->
diff --git a/pelican/tests/output/basic/tag/baz.html b/pelican/tests/output/basic/tag/baz.html
--- a/pelican/tests/output/basic/tag/baz.html
+++ b/pelican/tests/output/basic/tag/baz.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - baz</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,15 +35,15 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href="/second-article.html">Second article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
         </abbr>
 
-        <p>In <a href="../category/misc.html">misc</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/baz.html">baz</a></p>Translations: 
-            <a href="../second-article-fr.html">fr</a>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/baz.html">baz</a></p>Translations: 
+            <a href="/second-article-fr.html">fr</a>
     
 </footer><!-- /.post-info --><p>This is some article, in english</p>
                 </article>
diff --git a/pelican/tests/output/basic/tag/foo.html b/pelican/tests/output/basic/tag/foo.html
--- a/pelican/tests/output/basic/tag/foo.html
+++ b/pelican/tests/output/basic/tag/foo.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - foo</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,15 +35,15 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../second-article.html">Second article</a></h1> 
+                    <h1 class="entry-title"><a href="/second-article.html">Second article</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2012-02-29T00:00:00">
                 Wed 29 February 2012
         </abbr>
 
-        <p>In <a href="../category/misc.html">misc</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/baz.html">baz</a></p>Translations: 
-            <a href="../second-article-fr.html">fr</a>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/baz.html">baz</a></p>Translations: 
+            <a href="/second-article-fr.html">fr</a>
     
 </footer><!-- /.post-info --><p>This is some article, in english</p>
                 </article>
@@ -57,7 +57,7 @@ <h1>Other articles</h1>
                  
                         <li><article class="hentry">    
                 <header>
-                    <h1><a href="../this-is-a-super-article.html" rel="bookmark"
+                    <h1><a href="/this-is-a-super-article.html" rel="bookmark"
                            title="Permalink to This is a super article !">This is a super article !</a></h1>
                 </header>
                 
@@ -68,14 +68,14 @@ <h1><a href="../this-is-a-super-article.html" rel="bookmark"
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/yeah.html">yeah</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/foobar.html">foobar</a></p>
+        <p>In <a href="/category/yeah.html">yeah</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/foobar.html">foobar</a></p>
 </footer><!-- /.post-info -->                <p class="first last">Multi-line metadata should be supported
 as well as <strong>inline markup</strong>.</p>
 
-                <a class="readmore" href="../this-is-a-super-article.html">read more</a>
+                <a class="readmore" href="/this-is-a-super-article.html">read more</a>
                                 </div><!-- /.entry-content -->
             </article></li>
                             </ol><!-- /#posts-list -->
diff --git a/pelican/tests/output/basic/tag/foobar.html b/pelican/tests/output/basic/tag/foobar.html
--- a/pelican/tests/output/basic/tag/foobar.html
+++ b/pelican/tests/output/basic/tag/foobar.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - foobar</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,17 +35,17 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../this-is-a-super-article.html">This is a super article !</a></h1> 
+                    <h1 class="entry-title"><a href="/this-is-a-super-article.html">This is a super article !</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2010-12-02T10:14:00">
                 Thu 02 December 2010
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/yeah.html">yeah</a>. </p>
-<p>tags: <a href="../tag/foo.html">foo</a><a href="../tag/bar.html">bar</a><a href="../tag/foobar.html">foobar</a></p>
+        <p>In <a href="/category/yeah.html">yeah</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/foobar.html">foobar</a></p>
 </footer><!-- /.post-info --><p>Some content here !</p>
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
diff --git a/pelican/tests/output/basic/tag/oh.html b/pelican/tests/output/basic/tag/oh.html
--- a/pelican/tests/output/basic/tag/oh.html
+++ b/pelican/tests/output/basic/tag/oh.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - oh</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,17 +35,17 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../oh-yeah.html">Oh yeah !</a></h1> 
+                    <h1 class="entry-title"><a href="/oh-yeah.html">Oh yeah !</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2010-10-20T10:14:00">
                 Wed 20 October 2010
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/bar.html">bar</a>. </p>
-<p>tags: <a href="../tag/oh.html">oh</a><a href="../tag/bar.html">bar</a><a href="../tag/yeah.html">yeah</a></p>
+        <p>In <a href="/category/bar.html">bar</a>. </p>
+<p>tags: <a href="/tag/oh.html">oh</a><a href="/tag/bar.html">bar</a><a href="/tag/yeah.html">yeah</a></p>
 </footer><!-- /.post-info --><div class="section" id="why-not">
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
diff --git a/pelican/tests/output/basic/tag/yeah.html b/pelican/tests/output/basic/tag/yeah.html
--- a/pelican/tests/output/basic/tag/yeah.html
+++ b/pelican/tests/output/basic/tag/yeah.html
@@ -3,31 +3,31 @@
 <head>
         <title>A Pelican Blog - yeah</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie.css"/>
-                <script src="../js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="../css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="../">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="../override/">Override url/save_as</a></li>
-                                    <li><a href="../pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="../category/bar.html">bar</a></li>
-                                    <li ><a href="../category/cat1.html">cat1</a></li>
-                                    <li ><a href="../category/misc.html">misc</a></li>
-                                    <li ><a href="../category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
                 
@@ -35,17 +35,17 @@ <h1><a href="../">A Pelican Blog </a></h1>
 
                             <aside id="featured" class="body">
                 <article>
-                    <h1 class="entry-title"><a href="../oh-yeah.html">Oh yeah !</a></h1> 
+                    <h1 class="entry-title"><a href="/oh-yeah.html">Oh yeah !</a></h1> 
                     <footer class="post-info">
         <abbr class="published" title="2010-10-20T10:14:00">
                 Wed 20 October 2010
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="../category/bar.html">bar</a>. </p>
-<p>tags: <a href="../tag/oh.html">oh</a><a href="../tag/bar.html">bar</a><a href="../tag/yeah.html">yeah</a></p>
+        <p>In <a href="/category/bar.html">bar</a>. </p>
+<p>tags: <a href="/tag/oh.html">oh</a><a href="/tag/bar.html">bar</a><a href="/tag/yeah.html">yeah</a></p>
 </footer><!-- /.post-info --><div class="section" id="why-not">
 <h2>Why not ?</h2>
 <p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
diff --git a/pelican/tests/output/basic/this-is-a-super-article.html b/pelican/tests/output/basic/this-is-a-super-article.html
--- a/pelican/tests/output/basic/this-is-a-super-article.html
+++ b/pelican/tests/output/basic/this-is-a-super-article.html
@@ -3,38 +3,38 @@
 <head>
         <title>This is a super article !</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li ><a href="./category/misc.html">misc</a></li>
-                                    <li class="active"><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li ><a href="/category/misc.html">misc</a></li>
+                                    <li class="active"><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./this-is-a-super-article.html" rel="bookmark"
+        <a href="/this-is-a-super-article.html" rel="bookmark"
            title="Permalink to This is a super article !">This is a super article !</a></h1>
           </header>
 
@@ -45,10 +45,10 @@ <h1 class="entry-title">
         </abbr>
 
                 <address class="vcard author">
-                By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
+                By <a class="url fn" href="/author/alexis-metaireau.html">Alexis Métaireau</a>
         </address>
-        <p>In <a href="./category/yeah.html">yeah</a>. </p>
-<p>tags: <a href="./tag/foo.html">foo</a><a href="./tag/bar.html">bar</a><a href="./tag/foobar.html">foobar</a></p>
+        <p>In <a href="/category/yeah.html">yeah</a>. </p>
+<p>tags: <a href="/tag/foo.html">foo</a><a href="/tag/bar.html">bar</a><a href="/tag/foobar.html">foobar</a></p>
 </footer><!-- /.post-info -->      <p>Some content here !</p>
 <div class="section" id="this-is-a-simple-title">
 <h2>This is a simple title</h2>
diff --git a/pelican/tests/output/basic/unbelievable.html b/pelican/tests/output/basic/unbelievable.html
--- a/pelican/tests/output/basic/unbelievable.html
+++ b/pelican/tests/output/basic/unbelievable.html
@@ -3,38 +3,38 @@
 <head>
         <title>Unbelievable !</title>
         <meta charset="utf-8" />
-        <link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
+        <link rel="stylesheet" href="/theme/css/main.css" type="text/css" />
                 <link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
                 
         <!--[if IE]>
                 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
 
         <!--[if lte IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
-                <script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie.css"/>
+                <script src="/js/IE8.js" type="text/javascript"></script><![endif]-->
 
         <!--[if lt IE 7]>
-                <link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
+                <link rel="stylesheet" type="text/css" media="all" href="/css/ie6.css"/><![endif]-->
 
 </head>
 
 <body id="index" class="home">
         <header id="banner" class="body">
-                <h1><a href="./">A Pelican Blog </a></h1>
+                <h1><a href="/">A Pelican Blog </a></h1>
                 <nav><ul>
-                                                    <li><a href="./override/">Override url/save_as</a></li>
-                                    <li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
-                                                                    <li ><a href="./category/bar.html">bar</a></li>
-                                    <li ><a href="./category/cat1.html">cat1</a></li>
-                                    <li class="active"><a href="./category/misc.html">misc</a></li>
-                                    <li ><a href="./category/yeah.html">yeah</a></li>
+                                                    <li><a href="/override/">Override url/save_as</a></li>
+                                    <li><a href="/pages/this-is-a-test-page.html">This is a test page</a></li>
+                                                                    <li ><a href="/category/bar.html">bar</a></li>
+                                    <li ><a href="/category/cat1.html">cat1</a></li>
+                                    <li class="active"><a href="/category/misc.html">misc</a></li>
+                                    <li ><a href="/category/yeah.html">yeah</a></li>
                                                 </ul></nav>
         </header><!-- /#banner -->
         <section id="content" class="body">
   <article>
     <header>
       <h1 class="entry-title">
-        <a href="./unbelievable.html" rel="bookmark"
+        <a href="/unbelievable.html" rel="bookmark"
            title="Permalink to Unbelievable !">Unbelievable !</a></h1>
           </header>
 
@@ -44,11 +44,11 @@ <h1 class="entry-title">
                 Fri 15 October 2010
         </abbr>
 
-        <p>In <a href="./category/misc.html">misc</a>. </p>
+        <p>In <a href="/category/misc.html">misc</a>. </p>
 
 </footer><!-- /.post-info -->      <p>Or completely awesome. Depends the needs.</p>
-<p><a class="reference external" href="./a-markdown-powered-article.html">a root-relative link to markdown-article</a>
-<a class="reference external" href="./a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
+<p><a class="reference external" href="/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
+<a class="reference external" href="/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
 
     </div><!-- /.entry-content -->
     
diff --git a/pelican/tests/test_pelican.py b/pelican/tests/test_pelican.py
--- a/pelican/tests/test_pelican.py
+++ b/pelican/tests/test_pelican.py
@@ -77,7 +77,7 @@ def test_basic_generation_works(self):
         dcmp = dircmp(self.temp_path, os.path.join(OUTPUT_PATH, 'basic'))
         self.assertFilesEqual(recursiveDiff(dcmp))
         self.assertLogCountEqual(
-            count=10,
+            count=4,
             msg="Unable to find.*skipping url replacement",
             level=logging.WARNING)
 
diff --git a/pelican/tests/test_webassets.py b/pelican/tests/test_webassets.py
--- a/pelican/tests/test_webassets.py
+++ b/pelican/tests/test_webassets.py
@@ -56,6 +56,9 @@ def check_link_tag(self, css_file, html_file):
 class TestWebAssetsRelativeURLS(TestWebAssets):
     """Test pelican with relative urls."""
 
+    def setUp(self):
+        TestWebAssets.setUp(self, override={'RELATIVE_URLS': True})
+
     def test_jinja2_ext(self):
         # Test that the Jinja2 extension was correctly added.
 
@@ -90,8 +93,7 @@ class TestWebAssetsAbsoluteURLS(TestWebAssets):
     """Test pelican with absolute urls."""
 
     def setUp(self):
-        TestWebAssets.setUp(self, override={'RELATIVE_URLS': False,
-                                            'SITEURL': 'http://localhost'})
+        TestWebAssets.setUp(self, override={'SITEURL': 'http://localhost'})
 
     def test_absolute_url(self):
         # Look in the output files for the link tag with absolute url.