I have problems with LiteSpeed not evaluating mod_rewrite rules the same way as apache2
I have a php routing system with a mod_rewrite setting that rewrites http://example.com/page-name to http://example.com/index.php/page-name with $_SERVER[ REQUEST_URI ]. This works fine.
I have now added a URI to generate thumbnails from an image URI called ex http://example.com/generate-thumbnail?uri=/images/thumbnails/1.jpg. This URL generates a thumbnail image that is saved to http://example.com/images/thumbnail/1.jpg to enable caching.
The next step is a regexp that checks if an image at http://example.com/images/thumbnail/1.jpg and if not runs http://example.com/generate-thumbnail?uri=/images/thumbnails/1.jpg to generate a new thumbnail.
The .htaccess file below works great in apache2 but does not work at my hosting service that runs LiteSpeed. On LiteSpeed only the first rewrite rules is evaluated so that if http://example.com/generate-thumbnail?uri=/images/thumbnails/1.jpg does not exist the server seem to look for the file http://example.com/generate-thumbnail instead of evaluating the last rewrite rules that would result in the correct URL http://example.com/index.php/generate-thumbnail?uri=/images/thumbnails/1.jpg.
apache2 get this right but not LiteSpeed, why?
If I change the RewriteRule (.*) /generate-thumbnail?uri=$1 [L]
to RewriteRule (.*) /file_that_exists.php?uri=$1 [L]
where file_that_exists.php is a real file, everything works fine in LiteSpeed.
How can I get LiteSpeed to evaluate all the rewrite rules?
# Start the rewrite engine
RewriteEngine On
# Rewrite if post image was requested but is not cached, generate it
RewriteCond %{REQUEST_URI} ^/images/thumbnails/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) /generate-thumbnail?uri=$1 [L]
# Rewrite the page into the router
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]