Redirect9.Com

URL Shorteners from .htaccess

If you need a quick, easy, super-fast URL shortener for free, then the .htaccess file is your ticket. You simply edit the .htaccess file by entering a made up short code and the actual URL. That's it. Your server reads the .htaccess file and does the redirection. There are two ways to make a URL shortener out of a .htaccess file: using redirect rules or rewrite rules. Redirect rules are faster because they do not include RegEx capabilities.

Try adding the following lines to your .htaccess file in folder "/to/":

   Redirect /to/3b4f https://www.google.com/
   Redirect /to/linky https://codecanyon.net/item/linkity-business-url-shortener/23695804

Usage: https://redirect9.com/to/3b4f
Usage: https://redirect9.com/to/linky

You can get the code here . Just put in your short codes and upload to the folder that you want to use.

Try adding the following lines instead:

   RewriteEngine On
   RewriteRule ^(3af)$ https://www.google.com/
   RewriteRule ^(mylink)$ https://codecanyon.net/item/linkity-business-url-shortener/23695804

Usage: https://redirect9.com/to/3af
Usage: https://redirect9.com/to/mylink

Get the code here .

These short codes are not set up on Redirect9.com so the links won't currently work but you get the idea on to use them.

The rewrite rule uses RegEx which is why the beginning of line symbol ("^") and end of line symbol ("$") are used.

If you want to play around with .htaccess options then try out the .htaccess Generator .