.htaccess
samples
Rewrites
[URL rewriting]
[mod_rewrite]
Browse to an existing file. Rewrite nothing.
Browse to a directory. Rewrite to index.html file.
Redirects
[URL redirection]
[mod_rewrite]
Browse to a file that moved permanently. Redirect to a new location:
[HTTP 301]
Browse to a file that doesn't exist. Redirect to base dir:
[HTTP 302]
Browse to a directory that doesn't exist. Redirect to base.
[HTTP 302]
Browse to a directory without an index.html file. Redirect to base dir.
[HTTP 302]
Security
HTTP Security Headers
[OWASP Cheat Sheet]
[F]
[A+]
Disable directory view
[more]
Performance
[speed test]
Serve content without compression
Serve content on-the-fly with
deflate
Serve content pre-compressed with
gzip
Serve content pre-compressed with
Brotli
Errors
[more]
Show a default Apache error page.
[HTTP 400]
Show a custom error message.
[HTTP 401]
Show a custom error page.
[HTTP 404]
Show a custom error page that exposes internals.
Use with caution!
[HTTP 200]
Encoding
Use always in-document character encoding in HTML
[more]
[verify]
By default RFC Http/1.1 encodes ISO-8859-1
[RFC 2616]
[verify]
Use UTF-8 charset encoding to HTTP header in addition
[more]
[verify]
Misc
Output phpinfo()
[more]
Custom directory view
[more]