Blocking IP's .htaccess

magicm00n

Aspirant
Joined
Sep 25, 2008
Messages
47
Hi, I've been blocking IP's in .htaccess from my site using:

<Limit GET POST>
order allow,deny
<IP's here>
allow from all
</Limit>

All of a sudden now it stop working. What could be the problem?
 

DemOnstar

50 years in the making
Joined
Jun 7, 2013
Messages
1,354
Do you have cPanel on your host?
I use the IP Deny Manager there for all this kind of stuff.
 

magicm00n

Aspirant
Joined
Sep 25, 2008
Messages
47
Yeah I have that but I was using .htaccess for the IP blocking and now all of a sudden it stopped working. Could it be my host changed something?
 

DemOnstar

50 years in the making
Joined
Jun 7, 2013
Messages
1,354
I am not so sure if the .htaccess would be affected by your host changing something.
I thought .htaccess was a universal file and compatible with all.

Not to worry, someone with more knowledge than I have in these matters will be along shortly. I am sure you will find your solution within the next 24 hours or less.
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
Is there anything else in your .htaccess file that you can confirm is working?
 

magicm00n

Aspirant
Joined
Sep 25, 2008
Messages
47
Everything was working. This just happen all of a sudden. Could the host change something that is making blocking IP's through .htaccess not work?
 

ozzy47

Tazmanian Master
Joined
Oct 18, 2013
Messages
8,960
It's possible the host could have done something to stop the htacess from working. First step would be to ask them if that is the case. :)
 

magicm00n

Aspirant
Joined
Sep 25, 2008
Messages
47
My host said that there are no issues at their end. They also said: " Removing "allow from all" seems to fixed it."

Like are they seriously asking me to remove that? I'm guessing they don't even know what the code is about.

Any help guys?
 
Last edited:

DemOnstar

50 years in the making
Joined
Jun 7, 2013
Messages
1,354
Just exactly what does 'allow from all' mean?
I am familiar with 'deny from all' as that is the point of it. Denying access.

In this example, removing 'allow from all' makes sense. Again, denying access.
 

BirdOPrey5

#Awesome
Joined
Aug 14, 2008
Messages
4,217
I know they could do something to ignore .htaccess files completely so it would be useful to know if there is anything in your .htaccess file that is working.
 

DemOnstar

50 years in the making
Joined
Jun 7, 2013
Messages
1,354
Is there an example of a typical .htaccess available?

I understand that each user has different needs but what would a basic .htaccess look like regarding vB? Folders, files etc.......

Or is this not a valid question because of the variations involved?
 

we_are_borg

Tazmanian
Joined
Jan 25, 2011
Messages
5,964
Hi, I've been blocking IP's in .htaccess from my site using:

<Limit GET POST>
order allow,deny
<IP's here>
allow from all
</Limit>

All of a sudden now it stop working. What could be the problem?

If you want full blocking of the ip address you shoul remove the limit. Full blocking is as follows

Order allow,deny
deny from 192.168.1.1
allow from all

If you work with the limit get post or limit get header you can with php prevent the htaccess from working by altering the post or header.

Also do not use .htaccess as full blocking tool you should use the firewall for this.
 

Mike1995

Aspirant
Joined
Mar 4, 2014
Messages
39
I always thought the .htaccess "precluded" the firewall. Meaning, if .htaccess didn't cover it, the firewall did. Which in actuality, should be BEFORE the server, not built into it.
 

smirkley

ID'mazing
Joined
Nov 15, 2004
Messages
1,167
VB3 and VB4 need no .htaccess file at all. Typically there wouldn't be any.

Just wish to say that even though vb3 and 4 work well out of the box without an htaccess file, that is no means reason to believe you shouldnt use one.

I have a pretty extensive htaccess file on my v4.
And each and every entry quite literally enhance my visitors experience substantially for the better.

Forum optomization can be performed there, image handling of requests from the server can be improved there alot, image caching and page caching improvements also, let alone friendly urls require an htaccess file.

Also, blocking of IPs there is the most bandwidth saving place to perform that there.

I block significant portions of russia, china, and a couple other target 'bad' countries that I do not get any productive traffic from are blocked there.

And each blocked IP consumes hardly any processing power and never get sight or view of your files in the fastest amount of time.


htaccess is a beutiful thing when properly carressed. :shades:
 
Last edited:

Mike1995

Aspirant
Joined
Mar 4, 2014
Messages
39
Smirk is right, proper utilization of the ht file can be beneficial. If your limited on bandwidth, you can limit other sites from accessing your images. And you can limit like Smirk said, the countries that have a lot of spammers by blocking COUNTRY wide IP's. Which does work.
 

smirkley

ID'mazing
Joined
Nov 15, 2004
Messages
1,167
Saving bandwidth is nice if you need it.

My best result is in how fast my pages render on my visitors browsers.
That is where a websites experience is fully appreciated,... or not.
 

DemOnstar

50 years in the making
Joined
Jun 7, 2013
Messages
1,354
htaccess is a beutiful thing when properly carressed. :shades:

Lets have a look at it then...:creeper:
Show us an example of this beautiful thing...

Go on :excited:

I think mine is minimal, it has about 10 lines in it but I don't know how to make a good one.

Let's have a look...
 

smirkley

ID'mazing
Joined
Nov 15, 2004
Messages
1,167
Lets have a look at it then...:creeper:
Show us an example of this beautiful thing...

Go on :excited:

I think mine is minimal, it has about 10 lines in it but I don't know how to make a good one.

Let's have a look...

:unhunh: You make me smile.

I am not just going to cut-n-paste my htaccess here.
That wouldnt make any point except someone somewhere could diminish an entry in a file made for my site. Which would prove what.

Maybe a simple question should suffice.

I am not savvy on each and every browser.
But I try to stay informed on the top three.

That said, what slows your page rendering on a top browser the most?

(but honestly, maybe this is for another thread as to not stray off-topic)
 
Top