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 this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer