Dynamic redirect for SSL

Discussion in 'Site & Server Administration' started by KillaKeith, Nov 7, 2013.

  1. #1
    OK, I have a shared hosting server (we'll call it "host1") with SSL installed for cPanel/WHM secure connections. This causes all https requests on the hosted sites to pull the root directory for "host1", which just goes to a "default web page" template at the moment. I would like to have the following happen:

    1. If a user tries to visit an HTTPS address of one of my clients, they get redirected to the client's base domain as regular HTTP.
    2. If a user types in the root address for "host1" (either HTTP or HTTPS) without a folder name or port #, they get redirected to my company's domain www.example.com
    3. I would also like to have all direct IP requests for "host1" bounced to my company's domain www.example.com
    I'm torn as to the best and most efficient way to do this. PHP or htaccess? Or is there a better way? Any help is greatly appreciated, thanks in advance!!
     
    KillaKeith, Nov 7, 2013 IP