I need to create normal urls like what wordpress does. Ex: <https://www.website.ext/mypage>
And have them load pages from the database, not just static page files. But like how wordpress and other cms's do.

I'm well aware of the use of url parameters, such as /mypage?ID=124&fname=John
But those are sloppy and can also invite hackers. And I don't want that stuff in my urls if I can avoid it.

How do they have a url to a page that only exists in the database? How do you connect <https://www.website.ext/mypage> to something that displays in the browser without having an actual "mypage" file and still have these clean urls?

I just can't figure out how it's done. I've messed around a bit with .htaccess things, but I'm not real educated on htaccess stuff.

I suppose I should add that I am working with php7 and MySQL database.