Welcome to WebmasterWorld Guest from 3.231.228.109

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Hey! No peeking

barring inquiring minds from htaccess file

     
3:14 am on Oct 30, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 2, 2002
posts:1167
votes: 0


Which of the following is the better way to keep the inquisitive out of the htaccess file?

Option A
Set first line in htaccess to read:

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

(side note: not positive Option A actually even does the job, would appreciate a confident yeppers or nopers in that regard)

Option B

<Files .htaccess>
order allow,deny
deny from all
allow from ^001.001.000.000$
allow from ^001.001.000.001$
</Files>

(side note: the two allows would permit him/her what
edit the file easy viewing access, but only him/her)

Option C

#block view of htaccess
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^(Mozilla¦Opera)
RewriteCond %{REMOTE_ADDR}!^001.001.000.000$
RewriteCond %{REMOTE_ADDR}!^001.001.000.001$
RewriteRule ^\.htaccess$ [domain.tld...] [R,L]

(side note: works, not sure if it's the better
choice though)

3:19 am on Oct 30, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:July 29, 2003
posts:72
votes: 0


Personally I just leave the default apache httpd.conf entry -

<Files ~ "^\.">
Order allow,deny
Deny from all
</Files>

Which nicely lets me hide server side php scripts by starting them with a dot too ;-)

Robin

6:56 am on Oct 30, 2003 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893



- OR -

<Files ~ "\.htaccess$">
order deny,allow
deny from all
</Files>