Redirecting Connections to Cyberpanel Server for main VHost on 80/443 to another domain


I have my server set up as servername(dot)domainX(dot)com and accessing servername(dot)domainX(dot)com:8090 works great to interact with CyberPanel.

When someone accesses servername(dot)domainX(dot)com:80 or servername(dot)domainX(dot)com:443 they get a nice CyberPanel welcome page.

Instead of that, would like requests on 80 or 443 for that ‘administration’ vhost to be redirected to www(dot)domainY(dot)com:443 which is our main website.

Is this possible with CyberPanel on top of OLS?

My testing with standard .htaccess files does not seem to work. I read that this may be OLS not supporting redirects, but I thought there might be a workaround for this situation.

I think I need a condition that says if the connection is on port 80 or 443 then 301 redirect to this other website. I’m not sure how to achieve that.

I appreciate any guidance you can provide. Sorry for the (dot), Discourse thinks I’m a bot trying to spam my sites at you.