Please explain how these URLS !?

let's say there's this url

https://coub.com/tags/apple

Apple it turns out that page in the tags directory?? But the same can not be to each tag created its own page (with name tag), it is logical to use a template page for tags with a parameter apple, but then the url would already look like this: https://coub.com/tags?q=apple. Or what?
April 4th 20 at 00:30
3 answers
April 4th 20 at 00:32
Solution
Happy New year!

Apple it turns out that page in the tags directory??

No

But the same can not be to each tag created its own page (with name tag), it is logical to use a template page tags option apple

So. For all tags, use one page

but then the url would already look like this: https://coub.com/tags?q=apple

The web servers rewrite (literally - rewriting URL) so the URL can look like anything
April 4th 20 at 00:34
Solution
mod_rewrite
and other similar technologies
April 4th 20 at 00:36
Actually the url is just the url of the request in the http package. When the web server receives the request, it can be whatever you like (within standards, of course) to dispose of the data came in it.

And just as the web server free to which data is to be written in response. It may be data from a file, and can be just arbitrary text or a number. And all of this can be has nothing to do with the file system, which some web servers only imitate.

Also, link to spec.

Find more questions by tags Processing URL