Ahli Kompie

Konfigurasi Litespeed Cache .htaccess

# exclude awalan wp-admin, wp-login.php, wp-cron.php
# reference : http://blog.hawkhost.com/2015/07/22/super-charge-wordpress-with-litespeed-cache/

# exclude request dengan extention php, json, xml
# reference : http://stackoverflow.com/questions/5494542/how-to-exclude-specific-file-types-from-the-following-htaccess-rewrite-rule

# exclude request dengan get paramater (?)
# reference : http://stackoverflow.com/questions/12264952/exclude-request-with-get-parameter-from-htaccess-rule

# masalah user wordpress gak bisa login setelah litespeed cache nyala, gunakan “/” sebelum rules
# reference : https://www.litespeedtech.com/support/forum/threads/solved-wordpress-users-cant-login-when-litespeed-cache-is-active.9922/

<IfModule LiteSpeed>
CacheEnable public /
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-login.php|wp-cron.php)
RewriteCond %{REQUEST_URI} !^/.*/(wp-admin|wp-login.php|wp-cron.php)
RewriteCond %{REQUEST_URI} !.(php|json|xml)$
RewriteCond %{QUERY_STRING} !.+
RewriteRule .* - [E=Cache-Control:max-age=120]
</IfModule>

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *