PDA

View Full Version : password protection help needed


Magic
07-23-2002, 11:33 AM
I am creating a website for a club that needs to password protect a members only section of the site. I am fairly new at this, so I would appreciate any help. I tried using the CNC but it isn't bringing the desired effect. I was hoping that after logging in members would bring up the html pages, but instead I am bringing up the directory index. I am sure it is probably a very easy fix, but like I say I am fairly new at this and I am not exactly sure I am doing this correctly. Can anyone help??
Also is it possible for each member to have their own password. There are more than 50 members.

TIA
Magic

hobbes
07-23-2002, 01:12 PM
I was hoping that after logging in members would bring up the html pages, but instead I am bringing up the directory index.

Make sure you have an index.html (or equiv) file in each directory.


Also is it possible for each member to have their own password. There are more than 50 members.

Check out this thread:

http://www.aota.net/forums/showthread.php?s=&threadid=11799&highlight=htaccess

Magic
07-24-2002, 11:53 AM
Thank you for your help. The page is now loading after log-in. I do have one other question though. Is it possible to go back and forth between the public pages and the password protected pages which I had to put in a different directory?? Or do I have to upload all the public pages into the password protected directory also. Seems like a lot of duplication. Am I missing something here or is there an easier way fo doing this.
Thanks again
Magic

skolnick
07-24-2002, 11:56 AM
Browsers (all that I have used) save usernames and passwords that are authenticated successfully for the duration of the session (i.e. they aren't saved when you exit the browser). Accordingly you can move back and forth between public and private pages (and even go to another site and then come back) without having to log in again.

Magic
07-24-2002, 12:55 PM
I guess I wasn't very clear on my question. Sorry about that, I am pretty new at this. The password protected pages had to be put in a different directory. Can the users go back and forth between the two directories ( the public one and the password protected one). It isn't working here for me. Once I log in, I am stuck in the password protected directory. When I try to go back to the public pages I get a page can't be found error ( because its in a different directory.) Do I need to duplicate the files in both directories in order to go back and forth between the public and private directories. Or is there a simple way to password protect files within the same directory ( do they have to be in different directories?)?? There probably is a very simple way to do this, but I am not exactly sure how to accomplish this.

Thanks Again
Magic

hobbes
07-24-2002, 01:29 PM
Make sure your hyperlink (href tag) has the proper path. For example, if you have public directory dirPub with pubfile1.html and your user is viewing password-protected directory dirPass with pubfile2.html, then pubfile2.html should include an href="/dirPub/pubfile1.html" or href="../dirPub/pubfile1.html" to allow the visitor back to the public area.

Web clients will cache the most recent set of credentials used and will pass them to the site (if it's the same). Going from a password protected page to a public page should be seamless. Just make sure your hyperlink is valid.

Magic
07-28-2002, 10:43 AM
I think I am doing something wrong here. My public files are in www so I made the link< a href="/www/index.html">, however I am getting a file not found error, when I try to go back and forth between the password protected pages and the public pages.
I am sure I am missing something. Do I need a separate directory for the public files inside of www as I did for the password protected files??

Magic

Bob
07-28-2002, 10:57 AM
< a href="/www/index.html">, would be a link to /big/dom/xdomain/www/www/index.html

A relative link would be <a href="index.html"> while an absolute link would be <a href="http://example.com/index.html"> these would link to /big/dom/xdomain/www/index.html

Hope this helps,
Bob

Rich
07-28-2002, 02:10 PM
A relative link would be <a href="index.html"> while an absolute link would be <a href="http://example.com/index.html">
Also note that the first link (<a href="index.html">) is relative to the current directory. A site-relative link would be of the form <a href="/index.html">.

See http://hotwired.lycos.com/webmonkey/99/39/index3a_page3.html for more info.

Magic
07-31-2002, 09:51 AM
Thanks for all your help! I finally got it all working properly.

Magic