<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">I was excited to see a static site generator in Next. I want to write a prototype of a site, which would end up using Next. I'd love the prototype to be static so I can zip it up and send to someone who isn't tech savvy unzip and run the html. The issue is that someone needs to make the html run on "server" ie <code class="notranslate">serve</code></p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">Allow an option for <code class="notranslate">next export</code> which lets things run without a server. As far as I can tell the main issue is the way things are routed, followed by the way clicking <code class="notranslate">&lt;Link&gt;</code> is counted.</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">I tried detecting an environment variable to do an update like this:</p>
<p dir="auto"><code class="notranslate">correctedHref = </code>file:///C:${prefix}${href}/index.html`</p>
<p dir="auto">That made the <code class="notranslate">href=</code> point at an actual file, however clicking the link did nothing in the app, despite opening the link via source view showing what I wanted.</p>
<p dir="auto">There are many tags in the HTML which NextJS generates which contain absolute URLs. For example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="href=&quot;/_next/blah&quot;"><pre class="notranslate"><code class="notranslate">href="/_next/blah"
</code></pre></div>
<p dir="auto">I've added selenium + chrome headless testing to my Next project, and it works fine when I test <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a>, but when I do a <code class="notranslate">next export</code>, and then try to to test <code class="notranslate">file:///home/user/project_dir/out/index.html</code>, all of those absolute links are broken.I.e, it tries to fetch <code class="notranslate">file:///_next/blah</code> instead of: <code class="notranslate">file:///home/user/project_dir/out/_next/blah</code>.</p>
<p dir="auto">If I post-edit the generated HTML to make those links relative, then it all works fine.</p>
<p dir="auto">I need to be able to run my tests against the static files which are generated by export to ensure that they have been generated correctly before publishing.</p>
<p dir="auto">I suspect this is also an issue when people simply wish to run their nextjs application from a location other than the root of their website.</p>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>v3.0.1-beta.15</td>
</tr>
<tr>
<td>node</td>
<td>v8.1.3</td>
</tr>
<tr>
<td>OS</td>
<td>Debian 9</td>
</tr>
<tr>
<td>browser</td>
<td>Google Chrome 59.0.3071.115</td>
</tr>
</tbody>
</table>