Help with URL logic [closed]

0

Hello developers friends, I want to know what the logic is in this url:

link

Because I do not see any identifier to call that article or it's how I'm thinking, that this part is the identifier:

"the-most-of-countries-of-the-world-do-not-change-the-hour-because-it-does-not-make-sense-do"

Thanks in advance.

    
asked by Dante Alvarez Tupiño 26.03.2017 в 16:43
source

2 answers

0

I understand that the question is: Why is there no id in the url? How is that done? Understanding that the question is that, I answer:

The url is not composed of any ID by SEO and security issues. A search engine values much more if the url is readable by a human and contains keywords. The security issue is because by not putting any id you can avoid many types of sql injections or guess a sequence ...

To do that, what you do is when the server receives a request from the page, it looks for the article in the database through the title instead of the id.

The logic that follows that url seems to be that it is (category) / (title_article)

    
answered by 26.03.2017 / 16:58
source
0

This type of semantics is called URL Slug , appears with the rise of content managers such as Wordpress and SEO requirements in addition to having as main objective to convert the URLs more "user-friendly" and readable by the human at a glance. It is also known as "Clean Url".

The original standard of a Slug URL is: Domain / category / Keywords

Example: link

There are really endless algorithms to generate URL Slug, regardless of language or platform and even oneself with ingenuity I can create my own. But keep in mind that there are several potential algorithms to normalize a string when you use a URL slug. A typical pattern would be:

  • Small chain
  • Remove special characters and punctuation that require coding in the URL
  • Replace the spaces with a dash.
answered by 26.03.2017 в 18:51