Solved

Can't use .htaccess

Posted on 2006-11-24
8
338 Views
Last Modified: 2010-04-20
I installed XAMPP software in my server. You can found it here:http://www.apachefriends.org/en/xampp-windows.html . But yesterday I found that maybe the .htaccess haven't any effect. I put a file .htaccess with this content in 1 folder:
------------------------
<Files "test.php">
Order Deny,Allow
Deny from all
</Files>
------------------------
But the visitor can still access into the file "test.php".
And a lot of another test, I think that .htaccess didn't affect any little to the server.
What have I to do now?
Thanks.
0
Comment
Question by:luckylukevn
8 Comments
 
LVL 5

Accepted Solution

by:
rowdy_h earned 250 total points
ID: 18011609
You need to check the base apache configuration file. This config file can control whether .htaccess files are allowed and, if I remember correctly, even change the name of the file to use (as a security precaution so hackers don't know what the file is called).

The default name of this config file is httpd.conf look for any references to htaccess it should be located in the conf subfolder of the apache install directory.
0
 
LVL 18

Expert Comment

by:Sam Panwar
ID: 18013559
0
 
LVL 1

Assisted Solution

by:dr-dre67
dr-dre67 earned 250 total points
ID: 18061134
In

C:\Program Files\xampp\apache\conf

open httpd.conf

search this
[CODE]
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
[/CODE]

you will find this :
AllowOverride XXX

the XXX should be " All " ( to enable .htaccess in apache for Linux & Win32 )


and search
[CODE]
#LoadModule rewrite_module modules/mod_rewrite.so

[/CODE]

and delete the " # "


Best regards

Hachem LATRACH
0
 
LVL 4

Expert Comment

by:jackmcbarn
ID: 18657148
AllowOverride needs to be set in the httpd.conf file for htaccess files to work.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 18744255
Ugh.  Ignore me - this is a live question.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now