How hide SSL Port on url

Discussion in 'Installation/Configuration' started by GarGamel55, Jul 18, 2011.

  1. GarGamel55

    GarGamel55 New Member

    Hi,

    In /etc/apache2/conf.d/squirrelmail.conf, i've change the alias and comment out the ssl part, and i add this line (at the end) :

    Code:
    RewriteEngine on
    RewriteCond %{HTTPS} !^on$ [NC]
    RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI} [L]
    When i try http://xx.xxx.xxx.xx/myalias, i'm redirect to https://xx.xxx.xxx.xx:50443/myalias

    1) How to hide the port 50443 on url ?
    2) If i try http://xx.xxx.xxx.xx:50443/myalias (without s), i've a 400 bad request and the server show my hostname like : hints:https://hostname:50443/myalias ---> how to hide this too ?

    Thanks
     
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    You can not hide this port (or the port in the URL if it is no protocol standard port, e.g. 80 for http and 443 for https). It is implicitly necessary as it tells the browser to connect with which server with which protocol and on which port.

    So either you move your ssl things to 443 or you need to live with that.


    The same is with the error message. You may change the error message itself (design etc.) but it is still an error. As from the side of your webserver an unencrypted request on a port that is supposed to serve via ssl this is simply a bad request.
     

Share This Page