10

Are there any open source URL shortening software projects out there? Perhaps something that works in conjunction with Apache?

5 Answers 5

8

A lot of them popped up when I did a search on Github:

https://github.com/search?langOverride=&q=url+shortener&repo=&start_value=1&type=Repositories

5

Does this Count? http://code.google.com/p/urly/

or this http://yourls.org/

1
  • The liver version is read only due to changes in the google API. So this may not be usable any more. Nov 21, 2014 at 15:50
3

Firefly claims it can be up & running in 2 minutes: https://github.com/ariejan/firefly#readme

Here are some other suggestions: http://www.webresourcesdepot.com/7-open-source-and-free-url-shortener-scripts-to-create-your-own/

2

You could do it yourself easily enough with a database. Just store each long url in the database as a key and the short one as a value. You could easily create a short one with an auto-increment field in your table. Your urls would look like this:

http://mysite.com/12345

In your server side programming language of choice, just do a look up into the table, and then do a redirect.

1
  • 5
    Naturally. I'm hoping to not re-invent the wheel. Or at least get a good look at some existing wheels, first. Dec 17, 2010 at 0:20
2

I use http://yourls.org/ in my shortener, very powerful and plugin enabled. You can also easily create your own pages with stats and stuff.

Here's mine:

http://impbr.com

Not the answer you're looking for? Browse other questions tagged or ask your own question.