duane2364 2010-08-15 15:04
浏览 61
已采纳

保护服务器上的一个特定文件; .htaccess这样做的好方法?

I have a classifieds website.

I as an administrator need to be able to remove classifieds as I wish... So I have created a very simple remove function which only requires the name of the classified.

I plan on placing it on the server ONLY when I need to remove classifieds, so it wont be there unless I upload it and plan on using it. Then remove it when I am done.

I also plan on using htaccess to password protect it.

Is this a good plan?

And is it possible to only password protect one file on the server with htaccess? If so, how?

Thanks...

  • 写回答

2条回答 默认 最新

  • doumowu7371 2010-08-15 15:13
    关注

    You need to create a sub-directory called /admin or /remove, I don't think you can use it secure a single file. You shouldn't need to add and remove the file when you need to, that seems like a recipe for screwing up your authorization scheme (accidentally deleting .htaccess etc).

    If you choose a strong password and good username (not admin or administrator), you should be just fine.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元