A ready-to-use .htaccess and Nginx config starter pack covering HTTPS redirects, www handling, caching, compression, and security headers.
Demo
A live demo will be added here soon.
Screenshot
A screenshot will be added here soon.
What's included
- HTTPS redirect - forces every request onto HTTPS, on both Apache and Nginx.
- www / non-www handling - ready-to-uncomment rules for either direction, so you pick one canonical hostname instead of leaving both open.
- Browser caching - sensible cache lifetimes per asset type (long for images/fonts, short for HTML).
- Gzip / Brotli compression - Brotli where available, with an automatic gzip fallback so nothing breaks if it isn't.
- Security headers - a conservative baseline (
X-Content-Type-Options,X-Frame-Options,Referrer-Policy,Permissions-Policy), plus an optional HSTS header you opt into deliberately. - Commented throughout - every block explains what it does and why, and the README covers rule order and how to test each piece.
Download
This download includes:
.htaccessnginx.confREADME.md