Wordpress LScache Plugin: Minify CSS & JS got 404 because rewrite condition
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello, I need some help with Litespeed rewrite after minify CSS and JS files included Load Google Font Async to ON. I got errors 404 Not Found for : 1. http://domain/min/css_async.js 2. so many http://domain/min/randomtext.js 3. other else http://domain/min/randomtext.css I was make sure that is problem from rewrite with accesing each link above using : http://domain/index.php/min/xxxxxxx.js or .css and its work. Im not changing anything on my .htaccess file especially for Litespeed cache plugin .htaccess In my .htaccess, only this lines its not included on Litespeed wp cache plugin. RewriteEngine On RewriteBase / RewriteRule ^index .php$ - [L] RewriteCond % REQUEST_FILENAME !-f RewriteCond % REQUEST_FILENAME !-d RewriteRule . /index.php [L] Note : I cannot provide my link, because still using IP Address to setup the wordpress This topic was modified 4 years, 5 months ago by stanley48. Hi, Could you please provide full htaccess content ? Best regrds, Hi qtwrk, This is the .htaccess content # BEGIN LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## 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 LOGIN COOKIE start ### RewriteRule .? - [E=Cache-Vary:wp-postpass_2c7d48c23ed124744ae3fe9325ddeaa14d7 ] ### marker LOGIN COOKIE end ### ### marker FAVICON start ### RewriteRule favicon .ico$ - [E=cache-control:max-age=86400] ### marker FAVICON end ### ## 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 ### 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] ### marker MINIFY end ### ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END NON_LSCACHE # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index .php$ - [L] RewriteCond % REQUEST_FILENAME !-f RewriteCond % REQUEST_FILENAME !-d RewriteRule . /index.php [L] # END WordPressExpand Hi, Could you please check webserver log, php log and LSCWP debug log ? And also please check permission and owner of your website folder. That looks like minified/combined JS/CSS file failed to be generated/saved into disk. Best regards, Hi, Could you help me ? Where I can find that webserver log and also php log on lsws ? Permission for wp-content is 0755. btw, where is the file would saved ? I had some files on my /wp-content/cache/css/ - randomtext.css /wp-content/cache/js/ - randomtext1.js - randomtext2.js - randomtext3.js I cannot find css_async.js on my /js/ folder, but still can access directly using http://domain/index.php/min/css_async.js And I also tried to access : http://domain/index.php/min/randomtext1.js Its still working. Hi, It should be under wp-content/cache. If you saw files there , then this should not be a permission issue. Are all css/js files failed to load? or partially ? Best regards. Hi, All css & js minified, included css_async.js are failed to load. I think this problem on rewrite, but Im not familiar with .htaccess because link are generated by Litespeed Cache : http://domain/min/css_async.js and others.js got status 404 but I try to access with including index.php its working. http://domain/index.php/min/css_async.js and got minified content Best Regards Hi, I was make sure this is actually from my .htaccess redirection. Because I cannot accessing my post or pages domain.com/link Could you please check my .htaccess ? is there anything wrong ? I was enable rewrite on my virtual host, but not add extra rewrite rules there, only on my .htaccess Hi, May I know what is your webserver ? Best regards, ? solved. How did you solve it, my friend? I have the same problem, when using minify, it gives 404
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference