Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password protect the Index page #37

Closed
GoogleCodeExporter opened this issue Mar 20, 2016 · 4 comments
Closed

Password protect the Index page #37

GoogleCodeExporter opened this issue Mar 20, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

How can I password project the past for posting new URL but still keep it
open to that people I give the shortened URLs to can work with them?

Original issue reported on code.google.com by sha...@gmail.com on 24 Oct 2009 at 5:03

@GoogleCodeExporter
Copy link
Author

s/past/page/

Original comment by sha...@gmail.com on 25 Oct 2009 at 2:55

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

Original comment by hdo...@gmail.com on 19 Mar 2010 at 4:29

  • Changed state: WontFix

@GoogleCodeExporter
Copy link
Author

Issue 38 has been merged into this issue.

Original comment by hdo...@gmail.com on 19 Mar 2010 at 4:30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant