|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
Respected Sirs,
Iam a newbie in using apache.Iam using apache on WinNt for web hosting.Now I want to perform access control to certain directories by means of .htaccess files. My problem is the webserver does not even read the .htaccess file which i have placed in the directory which i want to protect.I have given Allowoverride AuthConfig in my httpd.conf file. I've also created my password file using htpasswd utility . I read it somewhere that in WinNT the .htaccess file should not be named as .htaccess and should be just htaccess.I tried even that and also changed "AccessFileName" to htaccess in the httpd.conf but still no result. The interesting point is if i give the following code in my httpd.conf file <Directory "c:\training"> AuthType Basic AuthName "Restricted Directory" AuthUserFile "D:\9ias\Apache\Apache\bin\mypasswd" require user alfred </Directory> my access control works perfectly fine. So what is the solution??.how to use it with .htaccess??? Also after the user is authenticated for a particular directory i want him to be again authenticated when he tries to access a particular file present inside that directory.I've tried using <Files>,<FilesMatch>,<LocationMatch> in httpd.conf but no use. Maybe iam doing things in the wrong way due to my inexperience with apache. So pls help and sorry for any disturbance caused. Thanx, Alfred |
|
#2
|
|||
|
|||
|
Hallo Alfred,
If your Apache doesn't want to read .htaccess file, so check AllowOverride option in your httpd.conf file. Probably it's None. Put instead of None - All. This directive lets apache to read info from .htaccess files and override httpd.conf directives. Ciao |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > htacccess help! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|