Blocking visitors from your website: Difference between revisions
(Created page with 'Presently there is no easy tool for this but if you have a professional hosting account with us you can accomplish the same thing by using .htaccess files. Free hosting users can…') |
No edit summary |
||
Line 12: | Line 12: | ||
Blocked users will be shown the 403 error page, | Blocked users will be shown the 403 error page, | ||
mywebsite.com/403_forbidden.html, which you can also edit. | mywebsite.com/403_forbidden.html, which you can also edit. | ||
[[Category:Websites]] |
Latest revision as of 06:04, 4 December 2009
Presently there is no easy tool for this but if you have a professional hosting account with us you can accomplish the same thing by using .htaccess files. Free hosting users cannot use .htaccess files.
You'll need to create a .htaccess file in the directory you want to protect like mywebsite.com/.htaccess and put the following inside:
order deny,allow deny from 11.11.11.11
11.11.11.11 being the IP address of the person you want to block from your site.
Putting the .htaccess file in the top most folder, mywebsite.com/ in this case, will also block them from looking at any subfolders like mywebsite.com/my_pictures/index.html. Alternately you can put the .htaccess file in a subfolder to protect only a portion of your site.
Blocked users will be shown the 403 error page, mywebsite.com/403_forbidden.html, which you can also edit.