Convert site from PHP to HTML5/JS/ajax only make use of 404 page

Load from same site url
meant

is any pattern implement urls of ccccc.com/name-model-AD-678905
go to ccccc.com/details.html?678905

only the 404 trick can do this or???