mod_proxy using .htaccess on LiteSpeed
I was just trying the same thing on LiteSpeed and found your post. The only way I could achieve the proxying was via a simple one-line PHP script.
<?= file_get_contents('http://example.com/');
So to do what you're doing, it would be something more like this...
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^fld/(.*) proxy.php?fld=$1 [QSA,last] RewriteRule ^?$ proxy.php [QSA,last]</IfModule>
And in proxy.php
:
<?= file_get_contents( 'http://example.com/' . '?fld=' . $_GET['fld'] . '&remoteaddr=' . $_SERVER['REMOTE_ADDR']);
I hope that makes sense. If your hosting provider happens to block remote URLs in this manner, you might need to use curl which is a bit more code.