We use cookies to ensure you can get the best experience on our site. If you keep using this site we assume that you agree to our use of cookies. Privacy Policy OK

How to use the .htaccess Generator

In this video hosting tutorial you will learn how to use the .htaccess generator from your hosting control panel. It is available for free and paid users. Return to Video Tutorials Page.

  1. First you need to select the .htaccess Generator section from the control panel.
  2. If you wish to choose a default index page, click on the “Choose your default index” checkbox and fill in the page name and the valid extension
  3. You can set additional MIME types by clicking on the checkbox and specify them.
  4. You can also add or block specific IP addresses. Click on the “Allow / deny web access by IP” and specify them. Note that multiple IPs must be comma separated.
  5. You can set your mod_rewrite rules. You can allow or block other websites to display media data from your website. Click on the “Enable authentication per web site” checkbox and specify the sites. Multiple sites are allowed, but they need to be comma separated
  6. To redirect non-existing or wrong URLs, click on the “Redirect not existing/wrong URLs” checkbox and specify the destination.
  7. You can redirect users with IPs from specific countries to dedicated pages. Click on the “Redirect by language” checkbox, then select the desired country (or multiple countries, select them using the Ctrl key) from the list and specify the redirection path in the “Redirect to URL” text box.
  8. You can also block visitors from specific unwanted website. To do so, click on the “Block sites by referrer” checkbox and enter the hostname(s) in the “Host to be blocked” textbox.
  9. You can setup custom error 400, 401, 403, 404 and 500 pages. To do so, click on the “Setup custom error pages ” checkbox and enter the path to your custom pages.
  10. If you have changed the location of a specific document you can add a redirection to the new path. Click on the “Setup Document Redirection” checkbox and enter the old and the new locations of the document
  11. To use hotlinking protection click on the “Set Hotlink Protection” checkbox.
  12. You can select a custom path for the .htaccess file. Leave the field blank to use /home/www/.
  13. If an .htaccess file exists already you can either overwrite it or update it with the current configuration.
  14. If you do not need the changes you have made, but not saved yet, you can reset the form by clicking on the Clear Form button.
  15. To generate your .htaccess file click on the Generate .htaccess button.
  16. The .htaccess file has been generated.
  17. You can either copy the code and paste it in an existing file or replace the current one with this.