Skip to content

Instantly share code, notes, and snippets.

@WesleySmits
Created June 3, 2025 15:02
Show Gist options
  • Select an option

  • Save WesleySmits/0498f2277e00d2c92f220ba86bf8dd4c to your computer and use it in GitHub Desktop.

Select an option

Save WesleySmits/0498f2277e00d2c92f220ba86bf8dd4c to your computer and use it in GitHub Desktop.
.htaccess - How to set up a cookieless domain
# Use Mod_deflate to compress static files
<ifmodule mod_deflate.c="">
<filesmatch ".(js|css|ico|txt|htm|html|php)$"="">
SetOutputFilter DEFLATE
</filesmatch>
</ifmodule>
# Speed up caching
FileETag MTime Size
# Expires
ExpiresActive On
ExpiresDefault "access plus 366 days"
# Future Expires Headers
<filesmatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"="">
Header set Expires "Sat, 27 Dec 2014 23:59:59 GMT"
</filesmatch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment