Something that is really confusing me is how sites have urls such as:
-and-
Originally, I thought you could simply just create a php file and use URL rewrite in the .htaccess. For example:
- http://example.com/shop.php
- http://example.com/shop.php/product-category.php/games.php (It just doesn't make sense).
Clearly, this is not the case as not only is it not efficient for more trailing slashes, but CMS's such as Wordpress automatically generate the content for the 'dynamic' URLs, and then redirect to a 301 page if the URL is not recognised.
I am wanting to implement this into my site, I'm just completely clueless on how I'd approach this. I am struggling to research deep into the topic due to myself being unaware what this system actually is. Obviously, I'm looking at this completely wrong, which is causing me to confuse myself.
If someone could explain to what this system is called, and how I can do it. I'd prefer not to get spoon fed code, I just need someone to explain it all too me.
EDIT: After some further researching, I have found a perfect example to make my question clearer. Notice this url:
has the same url as:
But shows different content, it's a completely new page, that is being 'dynamically' created.
Then more random URLs from the same site:
Thanks, Sutton