How to make several VHosts to point at the same directory?

#1
I have several domains (en.example.com, heb.example.com etc) that all point to the same WordPress website.
I need to make domain-specific redirects (en.example.com/About -> en.example.com/about-us). The issue is that if we use 1 Vhost for all domains, it seems that in a setup like this, OpenLiteSpeed just straight up ignores RewriteCond and redirects heb.example.com/About to en.example.com/about-us/:
Code:
RewriteCond %{HTTP_HOST} ^en\.example.com\.com$ [NC]
RewriteRule ^About$ https://en.example.com/about-us/ [R=301,L,NC]

RewriteCond %{HTTP_HOST} ^heb\.example.com\.com$ [NC]
RewriteRule ^About$ https://heb.example.com/about-us-he/ [R=301,L,NC]
So I assume the solution for that would be to make several Vhosts that point to the same folder? I tried that, but other Vhosts just return empty page.
 

Cold-Egg

Administrator
#2
If you want to use one Vh only, please enable the rewrite log and see why it does not match the heb rewritecond.
Separate it into multiple virtual hosts should work too, maybe you can share the configs here, or inbox me.
 
#3
I enabled rewrite log but wasn't able to find the actual log file anywhere. Does rewrite log only work for rules that you specify in the panel itself and not work for .htaccess?
 

Cold-Egg

Administrator
#4
It works for both, please try to set the VH rewrite log level to 9, and set the server error log level to INFO. Then you should see all the details in the server error log.
 
Top