2

In Magento I have added my IP to exclusion list in the .htaccess., however I still see 403 Forbidden page when I load the site. But if I change to "allow from all" the page loads fine.

order deny,allow
    deny from all
    allow from 111.222.333.44

Assume 111.222.333.44 is my IP

Why my IP is not recognized ?

Appreciate all responses.

Icon
  • 911
  • 1
  • 10
  • 31
  • What version of Apache are you running? – Joe Jun 23 '16 at 20:51
  • I am running Apache 2.2.24 – Icon Jun 23 '16 at 20:53
  • check the IP address is that of your own computer and not the IP address of the server (just checking you haven't got mixed up) – Joe Jun 23 '16 at 21:13
  • Did you enable `htpasswd` authentication for your website? if yes, you should use this link http://stackoverflow.com/a/3650673/1906322 – Amir Jun 23 '16 at 21:21
  • Good point, but in my case it doesn't work. – Icon Jun 23 '16 at 21:42
  • 1
    Check your apache access logs and confirm if you can see your IP address there (there might be a proxy between the client and apache which will hide the real client IP) – Dusan Bajic Jun 24 '16 at 07:59
  • 1
    Problem solved. There were restriction on my server side. Since router IP is dynamic the newly generated IP was blocked by the server. – Icon Jun 24 '16 at 18:22

1 Answers1

0

You can try this. But the error may happen for your server fault. Try this another server may work.

ErrorDocument 403 /error.html

order deny,allow
deny from all

allow from 111.222.333.444
  • Tried, does help, still 403 Forbidden error. It's just really strange that it allows form all, but my IP doesn't allow. and I restarted router several times. – Icon Jun 23 '16 at 20:58
  • you can write a iptable rules if you are using any linux server. Let me know i you do that @Icon – MD DELOYAR HOSSAIN Jun 24 '16 at 02:04