RakkoTools

Htaccess File Generator

Generate .htaccess and .htpasswd file

Add to favorite

URL Standardization

www
Protocol
Index to /

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)

Block or Allow IPs/Domains

Comma separated list.
Comma separated list.

Block bots

Change default directory page

Prevent viewing of .htaccess file

Prevent Directory Listing

Gzip compression

Copy Clear
Copy Clear

What this tool can

This tool helps you create .htaccess and .htpasswd files quickly and conveniently.

What is .htaccess file?

Hypertext Access (also known as htaccess) is a file used to configure the web server. It is accepted by the server as a component and allows us to flexibly navigate and enable features, or to protect certain folders of a website.


What is .htpasswd file?

A .htpasswd file is typically used when protecting a file, folder or entire website with a password using HTTP authentication and implemented using rules within a .htaccess file.


Some applications of .htaccess files :

  • Rewrite non-www to www/Remove www from URL
  • Redirect http/https
  • Redirect File or Directory
  • Caching Javascript, CSS, and Images
  • Password protect file (requires .htpasswd file)
  • Prevent Hotlinking
  • Custom Error Pages (400, 404, 500, etc)
  • Block or Allow an IP
  • Block bots
  • Change default directory page
  • Prevent viewing of .htaccess file
  • Prevent Directory Listing
  • Enable gzip

Rules with .htaccess file

  • You can use the # character to precede a line you want it to not run, ie switch that line to comment mode.
  • The .htaccess file will work with the current directory and all subfolders of the current directory.
  • If the .htaccess file fails to run, the result returns to the client will be 500 error.
    So you have to be careful when editing it and before editing you should make a copy to use as a backup.

Errors that easily occur when using .htaccess file incorrectly

  • 400 – Bad request
  • 401 – Authorization Required (assword required for access)
  • 403 – Forbidden
  • 404 – Wrong page (page not found)
  • 500 – Internal Server Error

Useful for

  • Quickly build excellent .htaccess file without configs known how.
  • Quickly generate .htpasswd file.
  • Prevent wrong syntax make Apache not working.
  • Remind to keep basic security prevent. Such as NOT allow list files, view .env or .htaccess

related tools