title: How to have relative paths in eleventy?
body: <p>I am currently working on a <a href="https://www.11ty.io/" rel="noreferrer">11ty</a> project and really like it. But I have a problem with the links when I deploy the output. I'd like to deploy it to 2 different locations on separate servers. One of the locations is in the root directory, the other one in a sub-folder.</p>
  
  <p>Is it possible to have relative links in the output? </p>
  
  <p>I already tried <a href="https://www.11ty.io/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix" rel="noreferrer">pathPrefix</a>, but either I don't use it properly or it just doesn't give me the result I am looking for.</p>
  
  <p><em>.eleventy.js</em>:</p>
  
  <pre><code>module.exports = eleventyConfig =&gt; {
  
      ...
  
      // Include our static assets
      eleventyConfig.addPassthroughCopy("images")
  
      return {
          pathPrefix: "/subfolder/",
          templateFormats: ["md", "njk"],
          markdownTemplateEngine: 'njk',
          htmlTemplateEngine: 'njk',
          passthroughFileCopy: true,
  
          dir: {
              input: 'site',
              output: 'dist',
              includes: 'includes',
              data: 'globals',
          }
      }
  
  }
  
  </code></pre>
  
  <p>When I run <code>eleventy --config=eleventy.config.js --serve</code>, an additional folder gets generated with the name <code>_eleventy_redirect</code>, including an <code>index.html</code> file with:</p>
  
  <pre><code>&lt;!doctype html&gt;
    &lt;meta http-equiv="refresh" content="0; url=/subfolder/"&gt;
    &lt;title&gt;Browsersync pathPrefix Redirect&lt;/title&gt;
    &lt;a href="/subfolder/"&gt;Go to /subfolder/&lt;/a&gt;
  
  </code></pre>
  
  <p>When I run <code>eleventy --config=eleventy.config.js</code> (without the <code>--serve</code>), that folder isn't there.
  However, either way all the links are absolute (e.g. <em>Home</em> is <code>href="/"</code>), and the site doesn't work on the server.</p>
  
  <p><strong>Is there a way to have either relative links (e.g. <em>Home</em> is <code>href="./"</code> on the root index.html and <code>href="../"</code> on sub pages) or at least include the subfolder in the urls (e.g. <em>Home</em> is <code>href="./subfolder/"</code>)?</strong></p>