Solved

Can't use .htaccess

Posted on 2006-11-24
8
347 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to generate a csr to request an intermediate ca on os x 3 49
Internal DNS Zone Issue 13 80
PHP Register global 21 96
Ubuntu Apache Webserver - File Permissions 5 58
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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