 <p>Add <code>&lt;base href="/demo/"&gt;</code> to your head or /demo/ to your links. The problem is, that you haven't told the browser to look in your subfolder.</p> <p>You can easily validate your links: just click on them, analyse the browser's addressbar and correct what's missing or extra in the address shown there.</p>