[Zen Cart] How to Block IP address from .htaccess

Magic SEO URLs for Zen Cart.
rashusweb
Posts: 2
Joined: Thu Sep 16, 2010 12:43 am

[Zen Cart] How to Block IP address from .htaccess

Postby rashusweb » Mon Dec 19, 2011 10:56 am

please suggest me how to block IP address as some websites are eating my band width, am using both .htaccess and readonly-htaccess in root folder. in which file need to write code for deny ip.
am loosing changes as .htaccess is read-only. do i need to change permission? please suggest.

inveo
Inveo Support
Posts: 1281
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [Zen Cart] How to Block IP address from .htaccess

Postby inveo » Mon Dec 19, 2011 11:21 am

If your .htaccess file is still loosing your changes when you made this file readonly and you have placed "readonly.htaccess" file within same folder then it is not Magic SEO URLs who is overwriting this file. It is likely some third party or host script.

rashusweb
Posts: 2
Joined: Thu Sep 16, 2010 12:43 am

Re: [Zen Cart] How to Block IP address from .htaccess

Postby rashusweb » Mon Dec 19, 2011 11:46 am

thank you ~j~
i didn't change any permissions till now...i would like to ask you if it is ok to change permissions for .htaccess. and can you please show the procedure to write
Order allow,deny
Deny from xx.xx.xxx

inveo
Inveo Support
Posts: 1281
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [Zen Cart] How to Block IP address from .htaccess

Postby inveo » Mon Dec 19, 2011 12:43 pm

Making .htaccess file read-only is not required if file named "readonly-htaccess" is placed within same directory (generally you can change permissions of the file by right-clicking and selecting Properties).

The way how you can deny an IP/host is described at http://httpd.apache.org/docs/2.2/howto/access.html