Build Apache .htaccess rules for redirects, HTTPS, security, CORS, cache, and more
Redirects all HTTP traffic to HTTPS using a 301 permanent redirect.
Sets long cache headers for static assets:
Prevents Apache from showing a list of files in a directory when no index file exists.
.htaccess Generator is a free, browser-based utility built for developers and engineers who need a fast, reliable way to build apache .htaccess rules for redirects, https, security, cors, cache, and more. Whether you're debugging an API response, preparing data for deployment, or validating configuration files, this tool handles the job in seconds — with zero server calls. Everything runs locally in your browser, so your source code and data stay private.
X-Forwarded-Proto header instead of HTTPS.