开发者

How to only show server directory list to a certain user in PHP?

开发者 https://www.devze.com 2022-12-16 19:12 出处:网络
I jus开发者_运维问答t finally after trying many time over the past few years, got my dev serer online.I put it online so I can show a couple friends progress on my work so I am not that worried about

I jus开发者_运维问答t finally after trying many time over the past few years, got my dev serer online. I put it online so I can show a couple friends progress on my work so I am not that worried about security because only a couple people will know the URL.

One thing I would like to accomplish though it to have the default directory list hidden, I know that is easy in an .htaccess file but I would like to somehow still show the directory lists to me, it could use some sort of login or based on my home IP, I just need a simple way, any suggestions on how I can do this?

I know I can make a simple PHP script but I would need to drop it into every directory almost and I would like to avoid that if possible.


Make a separate <VirtualHost> that contains:

Deny from all
Allow from <your IP address here>
Options +Indexes
0

精彩评论

暂无评论...
验证码 换一张
取 消