I'm implementing my first website, mainly consisting of one page, that loads its content via ajax. To differentiate the content in the address bar I use the History API of HTML5 to change it according to the content shown. There is no problem with that. So if I go to "www.mysite.com" it shows my landing page. If I then click on a nav item like "contact", it loads the requested content into the page and changes the address bar to "www.mysite.com/contact". Back and forth navigation in the browser does work, as long as I don't leave the page completely. Directly entering "www.mysite.com/contact" in the address bar gives me a 404 page not found.
Why is that so and what can I do about it? I want visitors to have the possibility to store bookmarks to that specific content they are on, but right now, they can only bookmark the landing page and have to navigate from there.
Is there a way, to always call my index.php from every path, that contains my domain and can call the content per ajax onload? Are there better/more correct ways? Is there any vocabulary that might be interesting for me?
Please no suggestions to fancy frameworks! I try to stick with html, js, php, css, apache, mysql to understand the underlying concepts before advancing to jquery, zend etc.
thanks in advance!
(I use Apache 2.4.27 with PHP 5.6.31)