1

I am struggling for weeks with .htaccess for one of my websites.

All I want is to allow one certain IP on the website and block everything else.

I'm using this code from here: https://stackoverflow.com/a/13938692

So:

Order Allow, Deny
Allow from 123.456.789.123
Deny from all

It's not making an exception for 123.456.789.123. Everything is blocked without exceptions.

If I do

Deny from 123.456.789.123

Then this IP is indeed blocked, but the code I pasted above that is recommended all on the net is not working for me

I also tried:.

  • Order Allow, Deny (without space after the period) this one bugs my site no matter what I enter afterward, so I guess space is the proper version.

  • Require (not changing anything).

example

Require all denied
Require ip xxx.xxx.xxx.xxx

Can someone help me out please :(>)-(

Abdul Karim
  • 4,359
  • 1
  • 40
  • 55

0 Answers0