SURLS is a simple URL shortener written in PHP based on Apache RewriteRule Directive
- Portable and doesn't need database to run
- Don't need any additional configuration.
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
example.com/surls.php
to use it.
- Visit https://surls.varunagw.com/ for a demo.
- Default username/password are admin/password.
They can be accessed either of these ways:
example.com/%alias%
example.com/surls/%alias%
example.com/surls.php?alias=%alias%
- 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.
- Create a bit.ly aliases for your favorite URL
- Make SURLS alias points to
biy.ly
link instead of the original URL
The redirect flow will be like example.com/alias -> bit.ly/abc -> example.com