Htaccess generator

  • Authentication
  • Custom error pages
  • Image hotlink protection
  • Block IP and domains
  • Redirect by language
  • Redirect by mobile device
  • Miscellaneous

Title for auth prompt

The .htaccess means hypertext access file, it is a directory-level configuration file.

Htaccess generator to get the configuration of htaccess easier. it could configurate the Authentication, Custom error pages, Image hotlink protection, Block IP and domains, Redirect by language, Redirect by mobile device and so on.

For example, when you want to add trailing slash to URLs, and Redirect from www subdomain to main on this domain then the generator will get the code like below:

RewriteEngine on

AuthType Basic
AuthName "My protected area"
AuthUserFile /absolute/path/to/.htpasswd
Require valid-user

RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule (.*)$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*[^/])$ /$1/ [R=301,L] provides you helpful and handy calculator resources.