Announcement

Collapse
No announcement yet.

Message being displayed in Hepsia CP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Message being displayed in Hepsia CP

    Click image for larger version

Name:	RSPMessage.jpg
Views:	274
Size:	66.5 KB
ID:	56695



    When I log in I’m seeing the above message. This is great information but if I'm reading the code right, this would block all access including the allowed IP!!

    Let me explain

    Code:
     order allow,deny
    This code "executes" the statements in this order. So this line is saying "Allow from x.x.x.x, then deny from all" this is wrong. You want it in reverse. "Deny from all, then allow from x.x.x.x"

    The correct code should be
    Code:
    # Block access to wp-admin.
    order deny,allow
    allow from x.x.x.x
    deny from all
    Last edited by clivejo; 12-04-2014, 02:36 PM.

  • #2
    "allow from x.x.x.x" would be an exception to the "deny from all" statement wouldn't it clivejo?
    Last edited by doneritehosting; 12-04-2014, 02:33 PM. Reason: spelling error

    Comment


    • #3
      It depends on the statement "order allow,deny" or "order deny,allow" which is performed first.

      Reading the code they give in the CP message, I dont think its going to work.

      Comment


      • #4
        Got ya...... so "order allow,deny" would be the proper syntax then correct?

        Comment


        • #5
          Consider the following

          Code:
          order deny,allow
          allow from all
          deny from all
          Will it deny all or allow all?

          Comment


          • #6
            I would say deny because your order is deny first then your closing rule is deny all, the rules conflict in order of execution...

            Comment


            • #7
              It will allow all. Try it!

              The line "order deny,allow" is determining the order so in simple English this code is "Denying all, but then overriding that command by allowing all"
              Last edited by clivejo; 12-04-2014, 02:56 PM.

              Comment


              • #8
                Ok continuing class then what is the reason

                # Block access to wp-admin.
                order deny,allow
                allow from x.x.x.x
                deny from all

                ​will not work?

                Comment


                • clivejo
                  clivejo commented
                  Editing a comment
                  This is what it should be, to perform the correct action. This code is saying "Deny from all, but allow from x.x.x.x" which is what you want, to protect your wp-admin folder. You replace the x.x.x.x with your static ISP IP address therefore only that IP has access to the folder.

                • clivejo
                  clivejo commented
                  Editing a comment
                  What I'm saying is that the code given in the CP Message wouldn't work properly. It would deny all with NO exceptions, therefore blocking the allowed IP address too.

                • doneritehosting
                  doneritehosting commented
                  Editing a comment
                  My bad clivejo, I was reading your "fix" code LMAO!!!!! not the cp message code you posted..... had me all confused lol!
              Working...
              X