.htaccess 拒绝所有人 [英] .htaccess deny from all

查看:31
本文介绍了.htaccess 拒绝所有人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我复制了我的一个旧应用程序并将其重命名为 New_application.我想访问 New_application 文件夹内的 .htaccess 文件.当我用文本编辑器打开它时,它只显示Deny from all".我试图在我的旧应用程序中打开 .htaccess,它也显示Deny from all".我记得我以前可以编辑它,但不确定现在不能编辑什么.有什么想法吗?非常感谢.

I have copied one of my old applications and renamed it to New_application. I want to access .htaccess file that is inside the New_application folder. When I opened it with my text editor, it just showed "Deny from all". I tried to open .htaccess in my old application, it showed 'Deny from all' too. I remember I was able to edit it before but not sure what I can't now. Any thoughts? Thanks a lot.

推荐答案

Deny from all 

是一个 .htaccess 命令(您试图查看的文件的实际内容).并不是否认能够编辑文件.只需在选择的文本查看器中重新打开 .htaccess 文件并根据需要进行更改,保存它,然后将其重新上传到您选择的文件夹中.

is an .htaccess command(the actual content of that file you are trying to view). Not a denial of being able to edit the file. Just reopen the .htaccess file in the text viewer of choice and make the alterations as you so desire, save it, then reupload it to your folder of choice.

尽管我认为您无意中阻止了您自己查看上传的应用程序.

Though I think inadvertently you are blocking even yourself from viewing said application once uploaded.

我会做类似的事情:

order deny,allow
deny from all
allow from 127.0.0.1

这将拒绝除 allow from 行中的 IP 之外的所有人,您可以更改 IP 以匹配您可以从 http://www.whatismyip.com/ 或类似网站.

which will deny everyone but the IP in the allow from line, which you would change the IP to match your IP which you can obtain from http://www.whatismyip.com/ or similar site.

这篇关于.htaccess 拒绝所有人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆