Disable Directory Browsing for All but Me

How can I use .htaccess to disable indexing and .php access for
everyone except for a specific IP address. The files inside the folder
still need to be accessible (images, js, css, etc) except for the PHP
files.

Stops indexing, but how do I allow my IP address to get the indexing:
Options All -Indexes

Blocks access to PHP, but I want my IP address to have access:
RewriteRule .*\.php$ - [F]

I'd like to keep it all in an .htaccess file, if possible. For both,
everything is in a directory under the root of the site.

Thanks,
Brad
bram1028 [ Fr, 20 Juli 2007 04:30 ] [ ID #1774163 ]

Re: Disable Directory Browsing for All but Me

You people suck...
bram1028 [ Fr, 17 August 2007 09:45 ] [ ID #1798564 ]

Re: Disable Directory Browsing for All but Me

bram1028 wrote:
> You people suck...
>
What people would that be that engage in sucking?

--
DM davidm [at] cia.com.au

'It would go against respecting principles and truth if you have to
respect and accept anything just because it is the other side's view.'
- Kim Jung Ill
David McKenzie [ Fr, 17 August 2007 09:51 ] [ ID #1798565 ]
Webserver » alt.apache.configuration » Disable Directory Browsing for All but Me

Vorheriges Thema: mod_proxy
Nächstes Thema: php does not work