Mod Rewrite code


I have had a website with Dreamhost since 2008 (shared server) but over the past year or so I have had problems with my htaccess with mod rewrite working & not working

I am a “noob” with Mod rewrite and would appreciate any help.
RewriteEngine on

This IP was blocked, then it wasn’t
RewriteCond %{REMOTE_ADDR} ^x04.93.([3-6][2-3]).
RewriteRule .* - [F]

and this one:

It blocks GoogleBot instead of allowing

RewriteCond %{HTTP_USER_AGENT} GoogleBot [NC]
RewriteCond %{REMOTE_ADDR} !^66.249.(6[4-9]|[7-8][0-9]|9[0-5]).
RewriteRule .* - [F]


Could there be some corruption in the mod rewrite module on laney server - I am still getting instances where I have IPs blocked in my htaccess, they will be blocked on a visit but will not be blocked when revisiting later. It is not just one single IP that this is happening to.


Are those the full .htaccess rules? It could be the formatting of everything around it causing the problem.

Thank you for replying - I am in the process of going thru my htaccess file now - then I will let it run for a week or two to see if this problem continues - as yet I haven’t found anything.

I will give a report when things are completed - although I am a noob at mod rewrite, I know from experience that sometimes it can be something very simple.

Thanks again,


Just completed going thru my htaccess file

I found several partial brackets (ie) missing ( and or ) and [ and or ]Too big of a hurry trying to get things done

I have it uploaded and will see what takes place.


Well I haven’t had any more problems to-date. It appears that the missing opening / closing brackets were causing the problem. Hopefully I will keep a closer watch on this sort of thing.