It doesn’t need anything complicated. Just have your route script redirect emoji to the right place, or even if you create a file or directory whose name is emoji itself.
There is nothing different than a " . php" of an "index.php" or ". php", are mere characters. Even, if the font used by your OS supports this, you will see the globin by the system explorer or shell.
A silly example with PHP, assuming you use friendly URL:
if( $caminho == "blog" ) {
header( "Location: //example.com/blog.php" );
exit();
} elseif( $caminho == "" ) {
header( "Location: //example.com/postagens_felizes.php" );
exit();
} elseif( $caminho == "" ) {
header( "Location: //example.com/stevejobs.php" );
exit();
} elseif( $caminho == "♥" ) {
echo "eu amo esse site";
...
Did you notice the " " in the code? It’s the same thing with the globe. I used as an example for being a character much more widespread than the globine, so it’s easier for everyone to read the example.
It is worth noting that the fact that the globe was colored in the result of the search until a while was a filter that exchanged the characters for a version with images, not only to ensure compatibility, but also to meet the aspirations of the new generation "internética". Currently the vast majority of browsers adopt their own set of coloured icons natively.
This happened in other contexts in other large contexts players market, and not just for Urls. (for example, Google Mail now has these boring things Nice little pictures on the "subject" of emails too, it’s been a while).
Of curiosity, these tables in particular usually have colored symbols in virtually all implementations "modern":
https://unicode-table.com/en/blocks/emoticons/
https://unicode-table.com/en/blocks/miscellaneous-symbols-and-pictographs/
Try copying some and pasting in the browser’s address bar.
Beware of the filesystem!
If the filesystem of your OS is encoding differently than the HTTP server, almost always a conversion solves (since the resulting name does not match with special characters of the filesystem). For example, the union of the ♫
is equivalent to ♫
in ISO-8859-1. I will not go into too much detail, as this is a mere implementation detail, and does not bear direct relation to the question. In addition, it is very likely that someone using this feature will manage the emoji by programming language, and not with files and folders.
Whereas Urls can be written with Unicode, it’s easy, right?
– Maniero
This is very interesting! I thought the unicodes were just those "ALT + 1..." that shows a little face, but it seems that now the Emojis have also been standardized. I found this cool, I found this page: http://apps.timwhitlock.info/unicode/inspect?s=%F0%9F%8C%90 Note that the "%F0%9F%8C%90" is the globe design that you mentioned in the question. And if you click on the site, is the globe in the UTF-8 representation.
– Matheus Franco
About the: "Apparently this "" in the url is a feature that makes the internationalization of the web application" - the globe is a character like qq other. could have chosen a "Y" or "Y".
– Bacco
Simple and fast example: http://ninja.net.br/ - It was enough to write an HTML file with this name in the root (I didn’t post in my reply, because I won’t keep this URL in the air indefinitely).
– Bacco