Forum Discussion

Reinhold_Just_7's avatar
Reinhold_Just_7
Icon for Nimbostratus rankNimbostratus
Apr 03, 2008

redirect 443 to other port

hi all,

 

 

how do i redirect a http://mydomain.com:1234 to https://mydomain.com or https://mydomain.com:1234?

 

 

i tried with

 

 

when HTTP_REQUEST {

 

HTTP::redirect "https://[HTTP::host][HTTP::uri]"

 

}

 

 

but nothing happened.

 

 

 

nobody can tell me, but i think the port 1234 is ssl. can this something to do with ?

 

 

 

 

regards Reinhold

4 Replies

  • Taking your example I suppose you can do it the following manner

    
      when HTTP_REQUEST {
        HTTP::redirect "https://[HTTP::host]:1234"
      }

    However, w/o really checking what is being request, ALL http requests will be redirected this way.

  • the port you want to use shouldn't be an issue

     

     

    if you need to redirect on port 1234 you just need to append ":1234" in your http::redirect response

     

     

    and if you try to do web browsing on specific port like www.f5.com:1234, then inside your client's request the hostname will be www.F5.com:1234. It will include the port in the HOST header. So you need to remove it when you're being redirect from such a site.

     

     

    HTH

     

     

     

  • BTW, port 1234 is not https. 1234 is registered by IANA by

     

     

    http://www.iana.org/assignments/port-numbers

     

     

    Tim Sent

     

    search-agent 1234/tcp Infoseek Search Agent

     

    search-agent 1234/udp Infoseek Search Agent

     

     

    It COULD be used as an HTTPS port but your server would have to be configured for this.

     

     

    Normal ssl port chosen when entering https == 443.

     

     

    Enjoy.