Generate common .htaccess rules for Apache web servers.
Runs entirely in your browser.
htaccess File Generation Tool
Redirects
Force HTTPS Force www Remove www Add trailing slash Remove trailing slash
Custom Redirects
301 Redirect (old to new)
to
Security
Disable directory listing Hide .htaccess & .env X-Content-Type-Options X-Frame-Options DENY XSS Protection header HSTS header
Performance
Enable Gzip compression Browser caching Remove ETags
Error Pages
Custom 404 Custom 403 Custom 500
Error page path
CORS
Enable CORS (all origins) CORS for fonts
Generated .htaccess
About .htaccess
The .htaccess file is a configuration file used by the Apache web server.
It allows you to make configuration changes on a per-directory basis.