Forum Moderators: phranque

Message Too Old, No Replies

Hey! No peeking

barring inquiring minds from htaccess file

         

kevinpate

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

WebmasterWorld Senior Member 10+ Year Member



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)

RobinC

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

10+ Year Member



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

keyplyr

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




- OR -

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