Message in a URL allows users to encode text within a URL.
This repository contains a website that allows users to input a message and a destination URL, and get back a URL with the message in it that also redirects to the destination URL.
For example: https://stuffjackmakes.com/message-in-a-url/?Check_out_this_🔥_🦆_search_engine!_aHR0cHM6Ly9kdWNrZHVja2dvLmNvbS8=
links to
A live example of this website is hosted at https://stuffjackmakes.com/message-in-a-url/.
The index.html file includes code to read additional arguments to the window.location. When it detects an encoded URL, it immediately decodes it and redirects the user there before finishing loading the page.
The URLs are encoded as follows:
- The base URL (e.g.
http://example.com/index.html) - A
?character to mark the start of an encoded URL - The plaintext message (e.g.
Your_URL_message_here!) - A
_character to mark the end of the message - The base64 encoded destination URL
- It is possible to generate invalid encoded URLs
- It is possible to redirect to invalid destination URLs
Host the index.html file with your software of choice and you're done!
Check out my other work at stuffjackmakes.com
