lauratpa / url_shortener

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URL SHORTENER

This application shortens url addresses given by a user into a shorter form. Each url given by the users is saved to the database. The id number of the saved url is converted from base 10 number into base 32 number.

www.google.com -> saved -> id number ‘9’ -> converted number ‘a’

This number then works as a path in application

shorturl.com/a -> points to www.google.com

When the user tries to access the address, the number in the path is extracted and converted back into base 10. Using this number the target url can be queried from the database and the user redirected to the address.

Additional features

  • by adding ‘!’ to the end of the url e.g. shorturl.com/a! the user can verify the target link

  • by adding ‘+’ to the end of the url e.g. shorturl.com/a+ the user can see how many redirects there has been through the link

About


Languages

Language:Ruby 93.2%Language:CSS 3.1%Language:JavaScript 2.8%Language:CoffeeScript 0.9%