Wordpress LScache Plugin: LITESPEED_WP_REALPATH not used in urirewriter.cls.php
Last Updated on: Wed, 15 Apr 2026 00:00:02 I was struggeling with non working fonts after LS combine on my site and fixed it with absolute URIs via customizer function for the moment. As I still got rare 404s for those font-formats (woff2, woff, ttf, eot) I had possibly missed, I checked all links inside the theme. The problem seems to occur during relative to absolute mapping in urirewrite.cls.php in combination with my server setup which uses a folder below htdocs as WP-root. The part between htdocs and wp-content is not stripped away. For other reasons I already defined LITESPEED_WP_REALPATH, but i figured out, LITESPEED_WP_REALPATH is not used inside UriRewriter::rewrite(). As this is working for me, I suggest the following change in the first lines of UriRewriter::rewrite() to be tested and merged: current code self::$_docRoot = self::_realpath( $docRoot ? $docRoot : $_SERVER[DOCUMENT_ROOT] ) to future code self::$_docRoot = self::_realpath( $docRoot ? $docRoot : ( defined( LITESPEED_WP_REALPATH ) ? $_SERVER[ DOCUMENT_ROOT ] . LITESPEED_WP_REALPATH : $_SERVER[DOCUMENT_ROOT] ) )
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference