The code block is pretty simple. When a request comes in Apache will take use the current host and redirect to a different port.

In this example we're using 8443 port which is the secure port for Plesk control panel.

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteRule (.*) https://%{HTTP_HOST}:8443%{REQUEST_URI} [L,QSA]
</IfModule>
Referral Note: When you purchase through an referral link (if any) on our site, we earn a commission.