doudg60800
doudg60800
2013-09-15 11:54
浏览 18
已采纳

拒绝访问其中的文件夹和内容,位于我的网站文件夹中

In short, I don't want a user to access folders, or the data or files in it.

I searched a bit, and I came up with deny from all, but it is not working when I put it on ftp; but on localhost its working.

I write the below given code in my upload folder:

# .htaccess mod_rewrite
RewriteEngine On

deny from all
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dqm4977
    dqm4977 2017-05-31 06:11
    已采纳

    Resolved:

    Just put an index.php file in the folder with the code:

    <?php
    header("Location: ../");
    ?>
    

    It will through the user out of that folder.

    点赞 评论

相关推荐