title: Pretty URL for static website
body: <p>I'm creating a "static" website, and I would like to have url like this :
  <code>http://www.my-website/my-page-1</code> or <code>http://www.my-website/my-page-2</code></p>
  
  <p>I use the jQuery method <a href="http://api.jquery.com/load/" rel="nofollow">load()</a> to load the content of my web pages.
  Here is my index.html :</p>
  
  <pre><code>&lt;body&gt;
      &lt;nav&gt;
          &lt;ul &gt;
              &lt;li id="my-page-1-menu-item" class="menu-item" onclick="changeState('my-page-1')"&gt;
                  &lt;span&gt;&lt;a&gt;Link 1&lt;/a&gt;&lt;/span&gt;
              &lt;/li&gt;
              &lt;li id="my-page-2-menu-item" class="menu-item" onclick="changeState('my-page-2')"&gt;
                  &lt;span&gt;&lt;a&gt;Link 2&lt;/a&gt;&lt;/span&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/nav&gt;
  
      &lt;!-- Content, loaded with $.load() --&gt;
      &lt;div id="content"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I know how to change my url without reloading the page, using the <a href="https://developer.mozilla.org/fr/docs/Web/API/History" rel="nofollow">history API</a></p>
  
  <p>Here is my javascript :</p>
  
  <pre><code>function changeState(url) {
      window.history.pushState(url, 'Title', url);
      loadStateData(url);
  }
  
  function loadStateData(state) {
      var content = '#content';
      $(content).load( 'views/' + state + '.html');
  
      // Manage menu style
      $('.menu-item').removeClass('active');
      $('#' + state + '-menu-item').addClass('active');
  }
  </code></pre>
  
  <p>With this code I'm able to reach <code>http://www.my-website/my-page-2</code> by clicking on <code>Link 2</code>, but if I refresh my webpage or if I type <code>http://www.my-website/my-page-2</code> directly in the browser address bar, I got a 404 error.</p>
  
  <p>I'm not very comfortable with .htaccess URL rewritting but I think it should solve my problem.</p>
  
  <p>And I don't want to use AngularJS, or other framework like that (except if its a really lightweight framework)</p>