473,796 Members | 2,537 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.htaccess enabled or disabled

254 Contributor
I have checked this info from apache website, and i confused with it.

Procteing System files

it said:
Expand|Select|Wrap|Line Numbers
  1. To run a really tight ship, you'll want to stop users from setting up .htaccess files which can override security features you've configured. Here's one way to do it.
  2.  
  3. In the server configuration file, put
  4.  
  5.     <Directory />
  6.     AllowOverride None
  7.     </Directory>
  8.  
  9. This prevents the use of .htaccess files in all directories apart from those specifically enabled.
  10.  
In the same time i have this ALSO in the server main configuration:
Expand|Select|Wrap|Line Numbers
  1. <Directory /home/user/directory>
  2. AllowOverride All
  3. </Directory>
  4.  
So, if i have a .htaccess in Directory called /home/user/directory/member/.htaccess , the server wont read this .htaccess file?[color=red] True or False ?[/color]

the .htaccess :
Expand|Select|Wrap|Line Numbers
  1. AllowOverride AuthConfig
  2. AuthUserFile /export/home/student/w0050853/CSC2406/html/ass2/members/.htpasswd
  3. AuthName "Password Required"
  4. AuthType Basic
  5. Require user user1
  6.  
Jan 13 '07 #1
1 4898
sashi
1,754 Recognized Expert Top Contributor
I have checked this info from apache website, and i confused with it.

Procteing System files

it said:
Expand|Select|Wrap|Line Numbers
  1. To run a really tight ship, you'll want to stop users from setting up .htaccess files which can override security features you've configured. Here's one way to do it.
  2.  
  3. In the server configuration file, put
  4.  
  5.     <Directory />
  6.     AllowOverride None
  7.     </Directory>
  8.  
  9. This prevents the use of .htaccess files in all directories apart from those specifically enabled.
  10.  
In the same time i have this ALSO in the server main configuration:
Expand|Select|Wrap|Line Numbers
  1. <Directory /home/user/directory>
  2. AllowOverride All
  3. </Directory>
  4.  
So, if i have a .htaccess in Directory called /home/user/directory/member/.htaccess , the server wont read this .htaccess file?[color=red] True or False ?[/color]

the .htaccess :
Expand|Select|Wrap|Line Numbers
  1. AllowOverride AuthConfig
  2. AuthUserFile /export/home/student/w0050853/CSC2406/html/ass2/members/.htpasswd
  3. AuthName "Password Required"
  4. AuthType Basic
  5. Require user user1
  6.  
Hi there,

Place the .htpassword file outside your web root, also specify the extact path of the .htpassword file in your .htaccess, hope it helps. Good luck & Take care.
Jan 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2991
by: Ivo | last post by:
Greetings newsgroup, I am moving some php scripts to a new host. While getting to know the server, I ran into a strange problem. If I add a .htaccess file, or more specifically: a .htaccess with content, to a folder, requesting (html and php) files from that folder results in internal server error messages. If I upload an empty .htaccess file, all is fine. Then phpinfo() tells me I am using Apache/1.3.27.
4
2860
by: Colleyville Alan | last post by:
I have 2 command buttons on a form. I want the first one to be enabled and the second one to be disabled when the form is opened. That works fine. Then, after the user has pressed the first button, I want them reversed - button #2 is enabled and #1 is disabled. But I keep getting this error message: "You can't disable a control while it has the focus". The code is basically this: Upon open
3
2536
by: dave | last post by:
How do I programatically determine the enabled or disabled status of AD accounts? I have queried the userAccountControl key, but all I get back is an int, and it seems to be the same for enabled or disabled accounts. Please help. I have read the following article: http://msdn.microsoft.com/library/default.asp?
5
9168
by: Leo J. Hart IV | last post by:
Hello, I'm hoping someone can help me out. I was wondering if the Enabled property of a CheckBox or RadioButton server control is stored in the ViewState. If not, is there some way to to add this property to ViewState? If needed, I can give you more info on exactly what I'm trying to do. Thanks,
1
1751
by: Mateo | last post by:
Hi, is there a way to display a disabled radiobutton as enabled? (without enabling it of course). In other words, how can I lock a radiobutton without dimming it? My problem is that when the radiobutton is disabled I don't like the way it is printed so I would like to print it as if it was enabled. Thanks all for your help
4
5965
by: Phill. W | last post by:
Here's a knotty little problem. I have some nasty little controls that needs to behave in a non- windows-Standard way - don't ask why; it's a large application being converted from some older code and my users are adamant that this behaviour mustn't change. Specifically, I want to be able to set myControl.Enabled = False
2
9256
by: jaanus | last post by:
Here we go... What I have been trying to do is to forward all http requests containing /cms/ to http://cms.mydomain.com/ example1: http://host1.mydomain.com/cms/init.php would be parsed from http://cms.mydomain.com/init.php (via ajax request) example2: <script src="http://host1.mydomain.com/cms/example.js" in <html><head> would be parsed from http://cms.mydomain.com/example.js physically there are no cms directories in...
4
6702
by: adnanjunk | last post by:
Hi, Having a little issue with .htaccess not working on windows server. I have clean url's setup using the htaccess file, working fine on linux server. I have researched for a while and found .htaccess doesn't work on windows. Since this is a shared hosting i don't have access to httpd.conf so that i can edit it. I have been reading this forum about it. http://forum.mambo-foundation.org/showthread.php?t=1857
2
2668
Markus
by: Markus | last post by:
Why is it not working? I joke. Here's the info: In the folder C:\host\www\test, I have an .htaccess file. Inside that .htaccess file is the following: RewriteEngine On RewriteRule ^test1.php$ /test2.php
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.