Skip to content

Instantly share code, notes, and snippets.

@thesaurabhk
Created June 2, 2017 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thesaurabhk/e911a48a783766ea0544cd434fdd662b to your computer and use it in GitHub Desktop.
Save thesaurabhk/e911a48a783766ea0544cd434fdd662b to your computer and use it in GitHub Desktop.
#
# Paste the following code into your .Htaccess file
# Don’t forget to change sample.com with your own domain name.
# If you don’t want to enable caching on multiple domains delete the hyphen (|) and other domains.
#
# TN – ENABLE LITESPEED CACHE START
<IfModule LiteSpeed>
CacheEnable public
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^GET|HEAD$
RewriteCond %{HTTP_HOST} ^sample.com|sample.net|sample.org [NC]
RewriteCond %{REQUEST_URI} !login|admin|register|post|cron
RewriteCond %{QUERY_STRING} !nocache
RewriteRule .* - [E=Cache-Control:max-age=300]
</IfModule>
# TN – ENABLE LITESPEED CACHE END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment