WordPress URL structure logic, how two different urls point to same content?

I have noticed that after rewriting URL in a WordPress site, I can reach the same content using two URLs:

http://example.com/category/article-name-here/primary_key

as well as

Read More
http://example.com/category/article-name-here

Both of these URLs will point to exact same content. What is the exact logic behind it, is the article name is in itself unique?

I am creating a startup site which will have the same URL structure. But I cannot have same unique-article-name.

Related posts

Leave a Reply

2 comments

  1. WordPress uses something called a router, which is also part of many frameworks, particularly MVC frameworks, to determine what content to show based on the URL. For example, it might look up something in the database (e.g. old pages that have been renamed), then show the content based on that, or it might only look for a file on the server and then show a 404 page if it doesn’t find it.

    Basically, look into routing as it relates to PHP frameworks to see how that whole logic works.