Live Chat Software by Kayako |
How to Block IP Addresses via an .Htaccess FilePosted by Justin Davis on September 01 2015 04:41 PM
|
|
An .htaccess (hypertext access) file is a configuration file that allows server configuration changes on a per-directory basis. The .htaccess file will override all global configurations for the directory in which it is located, as well as for all subdirectories. Common uses of the .htaccess file include: redirects, custom error pages, and PHP settings. Before making any changes to your .htaccess file, we strongly suggest making a backup copy of the file to allow easy restoration, if needed. This is because a single typo in the .htaccess file can cause your entire website to show an internal server error. To create an .htaccess file, you can simply create a text document in an editor such as Notepad or Notepad++, and save the file as ".htaccess". Any of th examples below will be added to a new line in the file, then saved. Once your .htaccess file is created, you will need to upload it to the folder in which you wish for the file to take effect. If you are not familiar with uploading files to your server, please review the following articles: Where to Upload Site Files via FTP, Using an FTP Program, or How to Upload or Download Files Using File Manager in the Control Panel This article provides two methods by which you can manage who is allowed to visit your site: either by blocking an IP, or allowing only specific IP addresses through.
After uploading your updated .htaccess file to the web server, you will need to synchronize the changes for them to take effect. This is done via the customer control panel. Instructions on synchronizing the .htaccess file to your web server can be found here: How to Sync an Htaccess File to the Web Server If you have any further questions that were not answered in this article, please contact us. | |
|