Closed GoogleCodeExporter closed 9 years ago
s/past/page/
Original comment by sha...@gmail.com
on 25 Oct 2009 at 2:55
Better stating the feature request:
- include an option to make the shortner for private use only, so that only the
registered users can shorten urls, and everyone else can only access the short
version.
For the moment, I have hacked the script to be for private use only by taking
these
steps:
1. Modified .htaccess to: RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?alias=$1 [L]
2. Renamed index.php to secret.php
3. Added at the begining of redirect.php:
if (empty($_GET['alias'])) {
header("Location: http://www.myprefferedsite.com", true, 301);
exit();
}
4. Renamed redirect.php to index.php
Now anyone trying to access the shortner without parameters or with a
non-existent
short url gets redirected to myprefferedsite.com. I can access the shortner by
directly pointing the browser to secret.php
However, this is only security by obscurity and a hack, whereas security by
design
would be preffered.
Original comment by gabriel....@gmail.com
on 26 Oct 2009 at 11:48
Original comment by hdo...@gmail.com
on 19 Mar 2010 at 4:29
Issue 38 has been merged into this issue.
Original comment by hdo...@gmail.com
on 19 Mar 2010 at 4:30
Original issue reported on code.google.com by
sha...@gmail.com
on 24 Oct 2009 at 5:03