Jump to content

Recommended Posts

Posted (edited)

Hi

 

My .htaccess file is not being read, at least it is not working. I've tried to make it manually, and through the IP blocker, neither works (I had blocked all possible IP's).

 

Is this a common issue, which is easy to fix? Or is it not from my part?

 

I've tried to delete all my files, and only have the .htaccess file, still not blocking anything.

 

Site: OlsenAlways.win

Edited by gamlenar
Posted

what folder is that .htaccess file in ?

what is the code in that file - for blocking all IP ?

Posted

what folder is that .htaccess file in ?

 

what is the code in that file - for blocking all IP ?

If I browse it by URL, then it works. But I don't know if this is because it loads my Default.aspx first?
/home/MYUSERNAME/public_html/.htaccess
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 1.0.0.1
deny from 1.0.0.2/31
deny from 1.0.0.4/30
deny from 1.0.0.8/29
deny from 1.0.0.16/28
deny from 1.0.0.32/27
deny from 1.0.0.64/26
deny from 1.0.0.128/25
deny from 1.0.1.0/24
deny from 1.0.2.0/23
deny from 1.0.4.0/22
deny from 1.0.8.0/21
deny from 1.0.16.0/20
deny from 1.0.32.0/19
deny from 1.0.64.0/18
deny from 1.0.128.0/17
deny from 1.1.0.0/16
deny from 1.2.0.0/15
deny from 1.4.0.0/14
deny from 1.8.0.0/13
deny from 1.16.0.0/12
deny from 1.32.0.0/11
deny from 1.64.0.0/10
deny from 1.128.0.0/9
deny from 2.0.0.0/7
deny from 4.0.0.0/6
deny from 8.0.0.0/5
deny from 16.0.0.0/4
deny from 32.0.0.0/3
deny from 64.0.0.0/2
deny from 128.0.0.0/2
deny from 192.0.0.0/3
deny from 224.0.0.0/4
deny from 240.0.0.0/5
deny from 248.0.0.0/6
deny from 252.0.0.0/7
deny from 254.0.0.0/8
deny from 255.0.0.0/9
deny from 255.128.0.0/10
deny from 255.192.0.0/11
deny from 255.224.0.0/12
deny from 255.240.0.0/13
deny from 255.248.0.0/14
deny from 255.252.0.0/15
deny from 255.254.0.0/16
deny from 255.255.0.0/17
deny from 255.255.128.0/18
deny from 255.255.192.0/19
deny from 255.255.224.0/20
deny from 255.255.240.0/21
deny from 255.255.248.0/22
deny from 255.255.252.0/23
deny from 255.255.254.0/24
deny from 255.255.255.0/25
deny from 255.255.255.128/26
deny from 255.255.255.192/27
deny from 255.255.255.224/28
deny from 255.255.255.240/29
deny from 255.255.255.248/30
deny from 255.255.255.252/31
deny from 255.255.255.254

 

Posted (edited)

a .htaccess file in folder [ public.html ] with this code...

<Files *>
order deny,allow
deny from all
</Files>
will block all IP address' - unless you allow any in that or other [ .htaccess ] files Edited by bdistler
Posted (edited)

a .htaccess file in folder public.html with this code...

<Files *>
order deny,allow
deny from all
</Files>
will block all IP address' - unless you allow any in that or other .htaccess files

 

 

 

I put it in same spot and changed content to yours, again nothing blocking. I don't think it is reading it.

 

Still need help.

Edited by gamlenar
Posted

I'm not sure why bdistler's code isn't working, but here's an alternative that works:

RewriteCond %{REMOTE_HOST} !^123\.123\.123\.123
RewriteRule ^(.*)$ - [L,R=403]
Change that 123.123.123.123 to your IP and it will show forbidden to everyone except for you.

 

http://olsenalways.win/

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...