Free .htaccess Generator

Rewrite to www

Redirects example.com to www.example.com

301 Redirect File or Directory

Caching Javascript, CSS, and Images

Comma separated list. Omit leading "."

Password protect file (requires .htpasswd file)

htpasswd Generator

Prevent Hotlinking

The domain that is hotlinking to you.
Comma separated list. Omit leading "."
Optional. What to show instead of the intended image.

Custom Error Pages (400, 404, 500, etc)

Bad Request
Auth Required
Forbidden
Not Found
Internal server error

Block or Allow an IP

Comma separated list
Comma separated list

Block bots

Change default directory page

Prevent viewing of .htaccess file

Prevent Directory Listing