.htaccess Maker

Advanced .htaccess Generator

Many webhosting plans are allowing to control the access to files and folders from the internet using a .htaccess file. Our .htaccess Generator helps you to create the most common settings used in .htaccess files. The online tool also builds the content for the corresponding password file (usually called .htpassword), including DES encrypted passwords.

Note: Some web hosting providers do not support all .htaccess settings. Some settings like URL rewriting with mod_rewrite are crucial when it comes to search engine optimizaton. If your web hosting provider does not support URL rewriting, you may check out our php hosting services. Even our free web hosting plan comes with PHP and mod_rewrite enabled.

Create .htaccess files online!

Use the following form to create your .htaccess file and password file.

 
URL rewriting
  • ?You can redirect all URLs with the same ending to a single file (e. g. a PHP script). Use for each ending an individual line and separate ending and target file with space. For example ".html /folder/script.php".
Hot link protection
  • ?You can block other websites from accessing your pictures or other files directly. So you can avoid other websites using up your traffic. List the endings of the files you want to block separated by a comma. For example ".gif,.jpg,.png,.flv,.js,.css".
  • ?Domain which is allowed to access the protected files.
Password protection
  • ?Name of the authentification. Use what ever you want. (e. g. "Password protected area")
  • ?Complete server path to your password file. (e. g. "/home/www/domainfolder.com/.htpasswd") To find out about your server path, just run a PHP file containing "<?php echo $_SERVER["SCRIPT_FILENAME"]; ?>" in the folder, where your password file will be located. Then replace the filename of the script with your password file. We strongly recommend a name beginning with a dot like ".htpasswd", This will hide the name in file listings.
  • ?Use for each user an individual line and separate username and password by a colon. For example "testuser:3pencils". Use only alphanumeric and non language specific characters.
  • ?Select "DES" if your website runs on a webserver which uses Unix DES-based encryption. This one-way encryption method is standard on Linux based servers. For higher security, our system will randomly generate a salt value for each password. If your website is on a Windows based server, select "none".
File listing
  • ?Select "enable" if you want to display a file listing to your users, in the case, that no standard page is available. To avoid a file listing, select "disable". If you set "default", the line will not be created and the default configuration will be used.
Block IP addresses or address blocks
  • ?You can block IP addresses from accessing your site. It is also possible to block ip blocks Separate each ip or ip block by comma. For example "123.45.6.7, 123.45.6.8, 234.56.7.". The last item in the example applies to the whole ip block from 234.56.7.0 to 234.56.7.255.
Own error pages
  • ?Document to be loaded when error 401 (Authorization Required) occures.
  • ?Document to be loaded when error 403 (Forbidden) occures.
  • ?Document to be loaded when error 404 (Not found) occures.
  • ?Document to be loaded when error 500 (Internal server error) occures.
.htaccess file content:

file content:

Notes

 
Get our toolbar!