PHP Routing
PHPTransform URLs with .htaccess
Your URLs might look something like this -> "index.php?page=about", which could be turned into -> "/about":
This way PHP understands that "http://yoursite.com/about" is -> "http://yoursite.com/index.php?page=about". So, when you are making a blog website and want to make 1,000 blogs, you are not going to make actual files, but simulate them, so your website thinks that these are real pages.
Create PHP Route
To make the code that's reposnible for this routing system, is like this:
Make the primary page, where the routing system's heart is.
Create a Folder
In order to make the router work, you need to create a folder and put whatever name you want for it. If you followed the previous code, named it "page". Then, create the files in the "page" folder:
The reason the routing system exists, is because you would have to copy/paste every blog title into your blogs home page. With routing, you can include the blog's title, description etc as a glob - a function that gets it done.