htaccess的所有否定 [英] .htaccess deny from all

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

问题描述

我抄了我的旧应用程序之一,并重新命名为New_application。我想访问.htaccess文件,它是New_application文件夹内。当我和我的文本编辑器中打开它,它只是显示为所有拒绝。我想在我的旧的应用程序打开的.htaccess,它表现得一切 拒绝。我记得我能过,但不能编辑它知道我现在不能。有什么想法吗?多谢。

解决方案

 所有拒绝
 

是一个.htaccess命令(您要查看该文件的实际内容)。不是否定了能够编辑该文件。只要重新打开选择的文本查看器.htaccess文件,并进行变更的,你愿意的话,保存它,然后重新上传到您选择的文件夹。

虽然我觉得在不经意间,你都不能查看阻塞甚至你自己说的应用程序上传一次。

我会做这样的事情:

 为了否认,允许
所有否认
允许从12.34.56.78
 

这将阻止所有人,但IP在允许行,您会更改IP来匹配你的IP,你可以从的 http://www.whatismyip.com/ 或类似的网站

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 

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.

I would do something like:

order deny,allow
deny from all
allow from 12.34.56.78

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天全站免登陆