Skip to content

StuffJackMakes/Message-In-A-URL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Message In A URL

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

https://duckduckgo.com/

Live Example

A live example of this website is hosted at https://stuffjackmakes.com/message-in-a-url/.

How it Works

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.

Encoding

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

Limitations

  • It is possible to generate invalid encoded URLs
  • It is possible to redirect to invalid destination URLs

Setup

Host the index.html file with your software of choice and you're done!

Author

Check out my other work at stuffjackmakes.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages