Dev Tools

.htaccess Generator

Generate .htaccess rules for redirects, rewrites, CORS headers, caching, and custom error pages.

General Options
WWW Redirect
CORS Headers
Browser Caching
Custom Redirects
No custom redirects added.
Custom Error Pages
No custom error pages added.
Generated .htaccess
# Force HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Directory listing disabled
Options -Indexes
Was this page helpful?

Related tools