DHTML Forum  

Go Back   DHTML Forum > dhtmlcentral.com > Off-topic
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07.12.2003, 13:00
weblogic weblogic is offline
Erfahrener Benutzer
 
Join Date: 18.04.2002
Location: USA
Posts: 907
Default

I've worked with htaccess access before, I've worked with custom built client login before. But never have I dealt with both at the same time.

The problem I face is that this website has a client login which allows clients to peruse webpages otherwise restricted, however there is also an area that the clients may go into that is protected by htaccess (which makes them login again).

When a client is logged in, is it possible to pass htaccess the username password programmatically, not bothering the user to once again login?

You may ask, why not just take off the htaccess and use the custom login. The main purpose of the htaccess is to restrict direct access to images/pdf's. (No this is not an adult site )

You may ask, why not have htaccess protect all of the files that need protecting. That's not how the client wants it.


Any points into a tutorial or just flat out telling me would be appreciated!



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07.12.2003, 14:02
jnichel jnichel is offline
Neuer Benutzer
 
Join Date: 05.12.2003
Location: USA
Posts: 10
Default

What is the custom built login written in?

I know with PHP you can check to see if the user has authenticated via htaccess, but I don't know if you can do it the other way around. This has been discussed numerous times on the php-general mailing list, and even if your custom login isn't in php, it might give you some direction...

http://marc.theaimsgroup.com/?l=php-...s=htaccess&q=b

----
If a server crashes in the woods, and no one is around to hear it, is it still Windows?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 07.12.2003, 14:14
weblogic weblogic is offline
Erfahrener Benutzer
 
Join Date: 18.04.2002
Location: USA
Posts: 907
Default

Thanks for the link jnichel.

Still haven't found my answer yet. It seems as if the same question has been raised a number of times, but a definite answer has not been reached.

I see a lot of examples of work arounds to this problem. The most common is putting the username / password in the url of the site, like so, http://USERNAME:PASSWORD@www.dhtmlcentral.com/. I can't even believe that people suggested this.



Oh well more digging won't hurt.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 07.12.2003, 21:49
Brian Nickel Brian Nickel is offline
Erfahrener Benutzer
 
Join Date: 11.05.2001
Location: USA
Posts: 1.157
Default

I haven't looked it over thuroughly, but this page has info on http authenication:
http://www.php.net/features.http-auth

<font color="brown"><font face="Courier New">.Brian</font id="Courier New">
<font size="2">Email: kerrick[at]gmx[dot]net - AIM: Brian K Nickel - Yahoo: brian_nickel - Jabber: Kerrick[at]jabber[dot]org - MSN: kerrick[at]gmx[dot]net - ICQ: 118451560</font id="size2">
Quidquid latine dictum sit, altum viditur.</font id="brown">
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08.12.2003, 00:55
weblogic weblogic is offline
Erfahrener Benutzer
 
Join Date: 18.04.2002
Location: USA
Posts: 907
Default

I'm toying with the idea of rewriting the old system. Putting the restricted files into the db and rewriting the existing code obviously. Not really the solution I want but it may work until I do come up with a solution I'm happy with.

Unless somebody has an idea how to restrict direct access to an image, lets say http://www.dhtmlcentral.com/images/logo.gif


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 08.12.2003, 01:45
weblogic weblogic is offline
Erfahrener Benutzer
 
Join Date: 18.04.2002
Location: USA
Posts: 907
Default

What a fool I be.

<inside of the .htaccess file>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/
RewriteCond %{HTTP_REFERER} !^http://www.yourdomain.com/
RewriteRule /* http://www.yourdomain.com/ [R,L]
</>

I was so wrapped up in using only one solution to the problem I didn't think about alternatives.


I'm still going to pursue the programmatic login to htaccess. I can see the need and there is definitely a want.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT +2. The time now is 03:46.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.