Invalid rewrite directive:

#1
Hello all,

Yet another issue I just noticed... In the error log for openlitespeed I see these messages:


2024-01-19 17:21:47.531836 [INFO] [42604] Invalid rewrite directive: ExpiresActive on
2024-01-19 17:21:47.531838 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/pdf A31557600
2024-01-19 17:21:47.531840 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/x-icon A31557600
2024-01-19 17:21:47.531842 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/vnd.microsoft.icon A31557600
2024-01-19 17:21:47.531843 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/svg+xml A31557600
2024-01-19 17:21:47.531845 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/jpg A31557600
2024-01-19 17:21:47.531847 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/jpeg A31557600
2024-01-19 17:21:47.531849 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/png A31557600
2024-01-19 17:21:47.531850 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/gif A31557600
2024-01-19 17:21:47.531852 [INFO] [42604] Invalid rewrite directive: ExpiresByType image/webp A31557600
2024-01-19 17:21:47.531854 [INFO] [42604] Invalid rewrite directive: ExpiresByType video/ogg A31557600
2024-01-19 17:21:47.531856 [INFO] [42604] Invalid rewrite directive: ExpiresByType audio/ogg A31557600
2024-01-19 17:21:47.531857 [INFO] [42604] Invalid rewrite directive: ExpiresByType video/mp4 A31557600
2024-01-19 17:21:47.531859 [INFO] [42604] Invalid rewrite directive: ExpiresByType video/webm A31557600
2024-01-19 17:21:47.531861 [INFO] [42604] Invalid rewrite directive: ExpiresByType text/css A31557600
2024-01-19 17:21:47.531863 [INFO] [42604] Invalid rewrite directive: ExpiresByType text/javascript A31557600
2024-01-19 17:21:47.531882 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/javascript A31557600
2024-01-19 17:21:47.531884 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/x-javascript A31557600
2024-01-19 17:21:47.531886 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/x-font-ttf A31557600
2024-01-19 17:21:47.531888 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/x-font-woff A31557600
2024-01-19 17:21:47.531889 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/font-woff A31557600
2024-01-19 17:21:47.531891 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/font-woff2 A31557600
2024-01-19 17:21:47.531893 [INFO] [42604] Invalid rewrite directive: ExpiresByType application/vnd.ms-fontobject A31557600
2024-01-19 17:21:47.531895 [INFO] [42604] Invalid rewrite directive: ExpiresByType font/ttf A31557600
2024-01-19 17:21:47.531897 [INFO] [42604] Invalid rewrite directive: ExpiresByType font/otf A31557600
2024-01-19 17:21:47.531899 [INFO] [42604] Invalid rewrite directive: ExpiresByType font/woff A31557600
2024-01-19 17:21:47.531900 [INFO] [42604] Invalid rewrite directive: ExpiresByType font/woff2 A31557600

My config is like this:

OpenLiteSpeed Admin Panel -> VHOST -> Context:

URI: exp:^.*(css|gif|ico|jpeg|jpg|png|webp|svg|woff|woff2|fon|fot|ttf)$
Location: $DOC_ROOT/$0
Accusable: Yes
Enable Expires: Yes
Expires By Type:
text/css=A15552000, image/gif=A15552000, image/x-icon=A15552000, image/jpeg=A15552000, application/x-javascript=A15552000, text/javascript=A15552000, application/javascript=A15552000, image/png=A15552000, image/webp=A15552000, image/svg=A15552000, font/ttf=A15552000, font/woff=A15552000, font/woff2=A15552000, application/x-font-ttf=A15552000, application/x-font-woff=A15552000, application/font-woff=A15552000, application/font-woff2=A15552000, image/svg+xml=A15552000
Header Operations:

unset Cache-control
set Cache-control public, max-age=15552000
set Access-Control-Allow-Origin: *

Everything else - not touched at all.
Any idea?
 

LiteCache

Active Member
#2
Ignore it.

LiteSpeed cache plugin doesn't check LiteSpeed web server version and adds ExpiresByType header to .htaccess regardless if LiteSpeed Enterprise or OLS is used, so ignore this info or remove entries from .htaccees, but ExpiresByType headers will be added again if you change browser cache settings in cache plugin.
 
Top