-
ASP Script for password protecting a directory.
Any one have personal scripts or a personal script for passwording a directory on a website?
Could the code be posted please.
-
Jul 24, 2003, 02:04 PM
#2
Re:ASP Script for password protecting a directory.
I kinna edited a borrowed script from the site below re: password protected web pages... maybe it will help.
Let me knwo if anything
http://www.js-x.com/asp/login.php3
-
Jul 24, 2003, 05:36 PM
#3
Re:ASP Script for password protecting a directory.
hmm..you can't password protect a directory with ASP. Most likely you are talking about password protecting a file or a webapplication? Password protecting a directory would have to be done in the windows/IIS security settings or the (.htaccess file for apache)
-
Jul 24, 2003, 06:08 PM
#4
Re:ASP Script for password protecting a directory.
[quote author=owen link=board=18;threadid=1130;start=0#msg12959 date=1059086202]
hmm..you can't password protect a directory with ASP. Most likely you are talking about password protecting a file or a webapplication? Password protecting a directory would have to be done in the windows/IIS security settings or the (.htaccess file for apache)
[/quote]
OR, you could do a poor man's password protection.
Take the URL from whichever system variable holds that value
Parse it to separate the filename from the directory path and then take the right most directory (break it up using '/'s)
Using some data value (database, flat file, hardcoded) compare the directory that you've separated with the value
If there's a match then give an error message or prompt the user for login information.
With a little massaging the above method can be used to password protect a directory and it's all script level. I can easily picture how that could be implemented in PHP, I'm not totally up on my ASP syntax and as such am unable to give you the code.
-
Jul 25, 2003, 09:32 AM
#5
Re:ASP Script for password protecting a directory.
-
Jul 27, 2003, 09:58 PM
#6
Re:ASP Script for password protecting a directory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules