redirecting 80 to 443

Discussion in 'Server Operation' started by gabriele, May 16, 2006.

  1. gabriele

    gabriele New Member

    :eek:
    I run debian sarge 3.1 2.6,apache-ssl and apache 1.3,my lan has a front modem-router,and a linuxbox gateway firewall attached to it,a switch,and 3 more servers,mail,www,icecast2.
    I don't know what is wrong with my configuration both iptables and apache but i don't manage to redirect those people still connecting to 80 when i moved the server to 443 but worst ... tcpdumping tcp port 443 and ,from the laptop on the fron-router,ponting the browser to https://www.hardcode.ath.cx
    I have these iptables on the gateway machine:
    On the www machine iptables :
    Apache has mod_rewrite to handle the rewriting of the url but ...
    Well!I know it's not enough to understand the origin of the problem but at the list how do these directives look ???
     
    Last edited: May 16, 2006
  2. falko

    falko Super Moderator ISPConfig Developer

    Have you tried

    Code:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} !=80
    RewriteRule ^(.*)$ https://www.hardcode.ath.cx/$1 [L,R]
    instead of

    Code:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} !=80
    RewriteRule ^.* - [F]
    RewriteRule ^(.*)$ https://www.hardcode.ath.cx/$1 [L,R]
    ?
     

Share This Page