Skip to content
54

.htaccess Snippets

✂A collection of useful .htaccess snippets.

13k stars1,275 forks7 entriesLast push Mar 6, 2026 (8 months ago)License Other

This page lists names, links and short descriptions. The original list on GitHub is the source and belongs to its authors.

Rewrite and Redirection >Remove Trailing Slash

This snippet will redirect paths ending in slashes to their non-slash-terminated counterparts (except for actual…

to https://www.example.com/blog. This is important for SEO, since it’s recommended to have a canonical URL for every page.

Link may be dead

Source

Link may be dead

Rewrite and Redirection >Redirect a Single Page

Source

Rewrite and Redirection >Redirect Using RedirectMatch

Source

Rewrite and Redirection >Alias “Clean” URLs

Source

Security >Deny Access to Backup and Source Files

Source

Performance >Compress Text Files

Source

Miscellaneous >Allow Cross-Domain Fonts

Source

Miscellaneous >Enable CORS

To restrict access to specific domains, replace * with the domain, e.g.

Miscellaneous >Auto UTF-8 Encode

Source

See category
99

Awesome Docker

veggiemonk/awesome-docker

:whale: A curated list of Docker resources and projects

Fresh★ 37k395 entriesPushed 4 days ago
95

Awesome Quant

wilsonfreitas/awesome-quant

A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance)

Fresh★ 31k744 entriesPushed today
94

Awesome System Design Resources

ashishps1/awesome-system-design-resources

Learn System Design concepts and prepare for interviews using free resources.

Fresh★ 43k139 entriesPushed 15 days ago
94

Awesome GraphQL

chentsulin/awesome-graphql

Awesome list of GraphQL

Fresh★ 15k486 entriesPushed 6 days ago
92

Awesome Django

wsvincent/awesome-django

A curated list of awesome things related to Django

Fresh★ 11k328 entriesPushed 21 days ago
92

Awesome Terraform

shuaibiyy/awesome-tf

Curated list of resources on HashiCorp's Terraform and OpenTofu

Fresh★ 6.7k474 entriesPushed today