loading words...

Jan 21, 2019 22:03:36

Apache and emojis

by @swizecteller | 215 words | 🐣 | 116💌

Swizec Teller

Current day streak: 0🐣
Total posts: 116💌
Total words: 32303 (129 pages 📄)

Today I learned that despite all the serverless advances in recent years, sometimes you still gotta get your hands dirty and edit that .htaccess file like it's 1999. #200wordsTIL

Then I discovered that Apache supports emoji URLs and my world changed.

---

For the new kids on our block 👇

Apache is a web server. It takes your request and returns files. HTML, JavaScript,you name it. It's the stuff that makes your cool JavaScript app work.

.htaccess files are per-directory config files. Think of it as package.json but for your server so you can have different webapps on the same machine.

---

But docker! Virtualization! Yes I know. 

We could host multiple apps on the same server before any of that. .htaccess was the easiest way to do it.

---

So I was setting up a rewrite from swizec.com/letters to swizec.com/letters.html. This RewriteRule tells Apache to treat /letters as if it was /letters.html.

🤘

---

Then I  had an idea.

---

And holy shit it worked! Apache supports emoji URLs!!!! :D

Which is more than you can say about Facebook.

---

Vim also does not support emojis. They show up like this 👇

(I use vim when editing files remotely)

Copy that into VSCode, save the file, and it corrupts your config. Everything dies.

That was fun to figure out.

Originally published at twitter.com

contact: email - twitter / Terms / Privacy