How would I go about making a site that uses ajax and history.pushstate? I know that on the page instead of linking you can call a script to ajax the page in and push the history but what about when someone types in the URL?
for example if I had a page at domain.com and someone typed in domain.com/profiles/3325/scott how would it know to go to domain.com and load in the data?
I didn't understand very well your doubt, but in this case (domain.com/profiles/3325/scott) you will have to use some framework or project pattern to handle the requests of that page. In fact you should do this to all of your pages.
I mean that you need to use something like MVC pattern, such as Spring MVC, that helps you to let or not a person to access some information. In this way, you don't need to worry about the history in browser, cause every time the user makes a request, new data is retrieved and the MVC will let or not the user to access it.