I have the following function that activates when I click on some links:

```
function showPage(page) {
    var History = window.History;
    History.pushState(null,null,page);
    $("#post-content").load(page + ".php");
}

```

The content of the page updates, the URL changes. However I know I'm surely doing something wrong. For example when I refresh the page, it gives me the Page Not Found error, plus the link of the new page can't be shared, just because of the same reason.

Is there any way to resolve this?