2

I've looked around and seen the way to create your own url shortener/mapping is by using an auto increment PK, convert it to base62 to use as the short_key, and then use the key to access the long_url value on queries. If I could set the short_code to be the PK, I would essentially gain a free index.

Is there a conversion that can shorten a string url (eg www.news.google.com#top) to a <6 character alphanumeric short_code that will be reliably unique?

Community
  • 1
  • 1
Brett Cawley
  • 57
  • 1
  • 5

1 Answers1

0

This is how you can make the shortcode reference your PK auto increment index: Github: ShortURL

8vtwo
  • 60
  • 7