Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 6th, 2001, 07:13 AM
alfred alfred is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2001
Posts: 3 alfred User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to alfred
Question can v have if..else in httpd .conf file

Hi,
I am a newbie to apache(on win-nt).Our company have a website which can be viewed both by guests and by our employees.I have used <directory> directive to block access to a particular folder in our company web site.So whenever the guest tries to access some files present in the resricted folder, an authentication screen would pop up asking for username
and password and when correct credentials are supplied the user is given access to the restricted folder.Now the problem is there is a login page which will be used for our employees to login to the site.So when one of our employee has successfully logged in and now tries to view the files in the restricted folder,he is again shown the authentication screen .So is there a mechanism whereby we can prevent a previously authenticated person from getting authenticated again...Can we have a if ..else construct in the httpd file and set some variable during the first quthentication process and check for the variable during the <directory> directive validation...


Pls help..It is of utmost urgency...


Thanx,
Alfred

Reply With Quote
  #2  
Old June 6th, 2001, 06:33 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> can v have if..else in httpd .conf file

The only way to do it as close as a if/else conditions in Apache is via mod_rewrite. Though not exactly if/else, but you can set RewriteCond and RewriteRule depends on the preceding condition.

>> he is again shown the authentication screen

Because the login.html is not under the protected area. There are a few workaround. Check this thread I posted few months ago -> http://forums.devshed.com/showthrea...hlight=AuthName , look for common-htpasswd specifically.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > can v have if..else in httpd .conf file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway