diff options
author | Dennis Eriksen <d@ennis.no> | 2020-05-15 10:34:47 +0200 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2020-05-15 10:34:47 +0200 |
commit | 9f428482a4ed20f36512f8255e8e80075c239af5 (patch) | |
tree | 91870737334d6db68f2ac69ea2648f3d24d7f1d2 /redirect.cgi | |
parent | we now support curling the form without getting all of the HTML in response (diff) | |
download | purl-9f428482a4ed20f36512f8255e8e80075c239af5.tar.gz |
I'm adding a + in front of the short URL, because I want to use another domain for this. It should probably be optional, but what the heck. I'm probably the only one using this.
Diffstat (limited to 'redirect.cgi')
-rwxr-xr-x | redirect.cgi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/redirect.cgi b/redirect.cgi index 9af5ed9..e95b74b 100755 --- a/redirect.cgi +++ b/redirect.cgi @@ -15,6 +15,7 @@ my $dbh = DBI->connect("dbi:Pg:dbname=purl") or die $DBI::errstr; # set the short my $short = scalar $ENV{REQUEST_URI}; $short =~ s/^\///; +$short =~ s/^\+//; # If short starts with +, remove it. # SQL Query my $query = qq(SELECT shorts.url FROM shorts WHERE shorts.short = ?;); |