osCommerce Community Support Forums -> how to block user or ip
Computing December 29th, 2003If you unable to edit httpd.conf, you can use .htaccess
Add the following code:
—Start—
ErrorDocument 401 /401.htm
ErrorDocument 403 http://www.go-away-site.com
ErrorDocument 404 /404.htm
ErrorDocument 500 /500.htm
order allow,deny
allow from all
deny from 100.100. #dont-want-one
deny from 200.200.200. #dont-want-two
deny from 200.200.200.222. #donot-want-three
—End—
You need to have ‘ErrorDocument 403 http://www.go-away-site.com’, so all access from your forbidden ip will redirected to www.go-away-site.com
With: deny from 100.100. #dont-want-one
All access from 100.100.* will be denied
With: deny from 200.200.200. #dont-want-two
All access from 200.200.200.* will be denied
With: deny from 200.200.200.222. #donot-want-three
Only access from 200.200.200.222 will be denied
Please remember always put ‘dot’ at the end of every ip address

Recent Comments