I have an Apache with SSL running on port 444. I need to rewrite all url/requests starts with https://servername ( that is default port 443) to https://servername:444.
I have rule on .htaccess like this:
RewriteCond %{SERVER_PORT} =443 RewriteRule ^(.*)$ https://%{SERVER_NAME}:444%{REQUEST_URI}
This is not working. To check the condition I changed the port on condition as RewriteCond %{SERVER_PORT} =80 and all HTTP requests are forced to HTTPS.