Skip to content
SURLS: Simple URL Shortener
PHP ApacheConf
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Ignoring /surls/ directory (Used by program to store aliases Feb 5, 2016
.htaccess Redirect directing index page to surls.php Feb 5, 2016 Updated demo link to SSL Feb 8, 2016
jquery-2.2.0.min.js Added jQuery Feb 5, 2016
surls.php Bump version to 1.4 Feb 6, 2016
surls_functions.php Improved examples Feb 5, 2016

SURLS: Simple URL Shortener

SURLS is a simple URL shortener written in PHP based on Apache RewriteRule Directive

Key Features

  • Single file based and portable
  • Don't need any additional configuration with majority of Apache installation


Apache with mod_rewrite enabled.


  • Copy surls.php and .htaccess into your website home directory.
  • Open surls.php with a text editor and change the default username/password
  • Visit to use it


I want to try it before installing

What is the URL of aliases created by it?

They can be accessed either of these ways:


Instead of a simple redirect, I want to execute a custom function and optionally redirect

  • Create surls_functions.php in the same directory which contains surls.php
  • Add your function into it
  • Make sure to create a dummy alias with the same name that you want to be processed by the function
  • You can also download surls_functions.php for a template.

I want some basic tracking too!

  • Create a aliases for your favorite URL
  • Make SURLS alias points to link instead of the original URL

The redirect flow will be like -> ->

You can’t perform that action at this time.