View Single Post
  #13 (permalink)  
Old 08-08-2007, 07:59 AM
Clint1's Avatar
Clint1 Clint1 is offline
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Jun 2005
Location: Louisiana, USA
Posts: 1,318
Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9Clint1 RepRank 9
Default Re: htaccess and login

Quote:
Originally Posted by dmadance View Post
Does anyone have a good script that can create a login to a site protected by htaccess. Also does someone have a script to logout from a site protected by htaccess.

I was thinking the logout could be done with AJAX by asking for a url http://randomstring:randomstring@mysite.com and when that fails to somehow redirect to the homepage. Is this feasable? If somebody has already done this I would love the code.

I know one can do logins with "http://usernameassword@mysite.com", does anyone have a script of some sort that can take userame and password as inputs to a form, and only goes to the page if authenticated to go the protected site. I think this can be done with AJAX. I am very new to AJAX (just read AJAX in 10 minutes 10 minutes ago) so if someone out there knows this, I would appreciate the helps.
(If you use cPanel), just it's "Web protect" or "Protect folders" area (the name depends on your skins used). Once you add a page or folder to this area, you have to enter a user and pass to get access to the page, and you can check the box to remember the login if wanted. No "logout" is required since you're logged out when you leave the page.
__________________
God Bless,
-Clint
(Join Date: 2003)
Reply With Quote