.htaccess reject all

I copied one of my old applications and renamed it New_application. I want to access the .htaccess file located in the New_application folder. When I opened it with a 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 that I could edit it before, but not sure what I can not now. Any suggestions? Thank you very much.

+44
.htaccess
Feb 29 2018-12-12T00:
source share
3 answers
 Deny from all 

is the .htaccess command (the actual contents of this file that you are trying to view). Not denying the ability to edit the file. Just re-run the .htaccess file in the selected text editor and make the necessary changes, save it, and then reload it into the desired folder.

Although I think that inadvertently you block even yourself from viewing the mentioned application after downloading it.

I would do something like:

 order deny,allow deny from all allow from 127.0.0.1 

which will reject all but the IP address in the allow from line, which you will change the IP address to match your IP address, which you can get from http://www.whatismyip.com/ or a similar site.

+116
Feb 29 2018-12-28T00:
source share
— -

This syntax has changed with the new Apache HTTPd server, see upgrade to apache 2.4 doc for full details.

2.2 configuration syntax was

 Order deny,allow Deny from all 
Configuration

2.4 now

 Require all denied 

So this syntax is 2.2

 order deny,allow deny from all allow from 127.0.0.1 

Will it be written now

 Require local 
+6
Jan 16 '17 at 10:11
source share

You can edit it. The contents of the file are literally "Deny from all", which is an Apache directive: http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny

+4
Feb 29 2018-12-12T00:
source share



All Articles