Hi
I used to use Apache rewrite rules in a .htaccess to act as a proxy when I used Apache on cPanel, I've now since switched to Litespeed and am trying to use the same .htaccess rules however they're not working like they used to on Apache.
I have the following in my .htaccess of domain1.com:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^api/(.*) http://domain2.com/api/$1 [P]
</IfModule>
When I access domain1.com/api/test, I seem to go into some sort of loop and my requests eventually show up in the access log of domain1.com but the content from domain2.com never gets retrieved - its access log shows no attempts.
My goal is to access domain1.com/api/test and for this to proxy the request to domain2.com/api/test
I've already read through https://docs.litespeedtech.com/cp/cpanel/rewrite-proxy/ but sadly hasn't helped me find a working solution.
P.S. how do I use mod_proxy since the above litespeed docs say it's supported since v6.0? I cannot find any documentation in litespeed's docs for this.
Thanks
I used to use Apache rewrite rules in a .htaccess to act as a proxy when I used Apache on cPanel, I've now since switched to Litespeed and am trying to use the same .htaccess rules however they're not working like they used to on Apache.
I have the following in my .htaccess of domain1.com:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^api/(.*) http://domain2.com/api/$1 [P]
</IfModule>
When I access domain1.com/api/test, I seem to go into some sort of loop and my requests eventually show up in the access log of domain1.com but the content from domain2.com never gets retrieved - its access log shows no attempts.
My goal is to access domain1.com/api/test and for this to proxy the request to domain2.com/api/test
I've already read through https://docs.litespeedtech.com/cp/cpanel/rewrite-proxy/ but sadly hasn't helped me find a working solution.
P.S. how do I use mod_proxy since the above litespeed docs say it's supported since v6.0? I cannot find any documentation in litespeed's docs for this.
Thanks