/wordpress
(wordpress address) and add a .htacces file to that folder. Then update LITESPEED settings and the below code will be added to the /wordpress .htacccess file instead of the .htaccess file in the root (site address):# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]
### marker CACHE RESOURCE start ###
RewriteRule cms_files/wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
[root@cpanel public_html]# ls -la
total 4
drwxr-x--- 1 testuser nobody 58 May 27 17:52 .
drwx--x--x 1 testuser testuser 392 May 27 17:36 ..
-rw-r--r-- 1 testuser testuser 623 May 27 17:52 .htaccess
drwxr-xr-x 1 testuser testuser 28 May 27 17:31 .well-known
drwxr-xr-x 1 testuser testuser 666 May 27 17:51 wordpress
[root@cpanel public_html]# cat .htaccess
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-alt-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?test.domain.com$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?test.domain.com$
RewriteRule ^(/)?$ wordpress/index.php [L]
[root@cpanel public_html]# cat wordpress/.htaccess
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]
### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-alt-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
[root@cpanel public_html]# cat .htaccess
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-alt-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?test.domain.com$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?test.domain.com$
RewriteRule ^(/)?$ wordpress/index.php [L]
</IfModule>
[root@cpanel public_html]# cat wordpress/.htaccess
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]
### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A15552000
ExpiresByType image/x-icon A15552000
ExpiresByType image/vnd.microsoft.icon A15552000
ExpiresByType image/svg+xml A15552000
ExpiresByType image/jpg A15552000
ExpiresByType image/jpeg A15552000
ExpiresByType image/png A15552000
ExpiresByType image/gif A15552000
ExpiresByType image/webp A15552000
ExpiresByType video/ogg A15552000
ExpiresByType audio/ogg A15552000
ExpiresByType video/mp4 A15552000
ExpiresByType video/webm A15552000
ExpiresByType text/css A15552000
ExpiresByType text/javascript A15552000
ExpiresByType application/javascript A15552000
ExpiresByType application/x-javascript A15552000
ExpiresByType application/x-font-ttf A15552000
ExpiresByType application/x-font-woff A15552000
ExpiresByType application/font-woff A15552000
ExpiresByType application/font-woff2 A15552000
ExpiresByType application/vnd.ms-fontobject A15552000
ExpiresByType font/ttf A15552000
ExpiresByType font/woff A15552000
ExpiresByType font/woff2 A15552000
</IfModule>
### marker BROWSER CACHE end ###
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-alt-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
[root@cpanel public_html]# curl -I -XGET http://test.domain.com/wp-includes/css/dist/block-library/theme.min.css?ver=5.2.1
HTTP/1.1 200 OK
Connection: Keep-Alive
Cache-Control: public, max-age=15552000
Expires: Sat, 23 Nov 2019 16:15:52 GMT
Content-Type: text/css
Last-Modified: Mon, 27 May 2019 15:49:24 GMT
Accept-Ranges: bytes
Content-Length: 1495
Date: Mon, 27 May 2019 16:15:52 GMT
Server: LiteSpeed
[root@cpanel public_html]# curl -I -XGET http://test.domain.com/wordpress/wp-includes/css/dist/block-library/theme.min.css?ver=5.2.1
HTTP/1.1 200 OK
Connection: Keep-Alive
Cache-Control: public, max-age=15552000
Expires: Sat, 23 Nov 2019 16:16:16 GMT
Content-Type: text/css
Last-Modified: Mon, 27 May 2019 15:49:24 GMT
Accept-Ranges: bytes
Content-Length: 1495
Date: Mon, 27 May 2019 16:16:16 GMT
Server: LiteSpeed