my Simple Short URL Service
mySSUS is my Simple Short URL Service and it has the following features:
Short URLs can be managed in a hierarchical way. The tool came into existence because I needed a short URL service for the magazine I work for (EasyLinux). This was the task: In
I found no such tool, now there is one (mySSUS).
This is a sample file:
a1 EasyLinux 04/2010 a1a Erster Testartikel a1a1 http://www.easylinux.de/ a1a2 http://www.linux-user.de/ a1a3 http://www.linux-magazin.de/ a1b Zweiter Testartikel a1b1 http://www.easylinux.de/ a1b2 http://www.linux-user.de/ a1b3 http://www.linux-magazin.de/ a1b4 http://www.linux-community.de/Empty lines will be ignored, but you can enter them in order to make the data file readable. Separation of short and long URL happens with \t (tab) in this case, you can reconfigure mySSUS to use something different. However the separator should be something that will not appear anywhere else. If it does appear elsewhere, the tool breaks (it is "simple", as promised).
The short URLs have a syntax which represents the hierarchy mentioned above. In the example URL a1b4 the parts mean:
The file contains header entries (a1, a1a, a1b in the example). The first one (a1) is required for the file, it names the issue. The other ones (a1a, a1b) name articles, and they will be shown in some situations if available.
In order to use mySSUS, you need to do three things:
Options ExecCGI +Includes FollowSymlinks AddHandler cgi-script .py RewriteEngine On(Some of the options may not be required; I started with an already existing virtal host definition, so you may be able to remove some of this.)
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.py [L] </IfModule>This basically maps every file request to index.py unless there's a file or directory by that name. So don't create other content on the same host that looks like a valid short URL.
Also you will have to provide at least one data file to make any use of the software, but it will work without one, just displaying the standard texts.
mySSUS comes as a tar.gz archive containing index.py, a sample a1.data file and some documentation.
Versions:
mySSUS 0.1: my Simple Short URL Service
Copyright (C) 2010 Hans-Georg Eßer <h.g.esser *AT* gmx.de>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.