Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
Apache Web Server
3:19 am May 2, 2026
This page requires javascript.
Forum Moderators:
phranque
Message Too Old, No Replies
"Protecting" the htaccess file.
Is this suitable code?
Broadway
Msg#:4184475
9:44 pm on Aug 9, 2010
(gmt 0)
While reading about .htaccess files I saw mention of this code as a way of "protecting" the htaccess file itself.
<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>
Any reason not to do this?
mack
Msg#:4184482
9:57 pm on Aug 9, 2010
(gmt 0)
The htaccess should be protected by the apache configuration file. The following will generaly be found within the apache2.conf or httpd.conf
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>
What this does is prevent a browser or client from being able to see or read the .htaccess or .htpasswd files.
Mack.
Broadway
Msg#:4184537
12:36 am on Aug 10, 2010
(gmt 0)
thanks
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
AdSense Earnings and Observations - April 2026
what do they want?
Hello again, it's been a while
I need some SEO help
SEO question
Do you get tired of others copying your content?
5 SEO Tips That Actually Worked for My Blog in 2026
Home
Forums Index
Server Side
/
Apache Web Server
3:19 am May 2, 2026