Redirect HTTPS to HTTP

Discussion in 'Installation/Configuration' started by Jürgen, May 19, 2009.

  1. Jürgen

    Jürgen New Member

    Hello,

    I have a lot of domains running. All of these don't use any SSL certificate. So I would like to redirect all requests on https to the http page instead of showing an error.

    Is that possible?

    Thanks a lot
     
  2. Ben

    Ben Active Member Moderator

    Well I am using mod_rewrite to redirect all http for a host to https, so this should work vice versa:

    Code for http -> https
    Should do for https to http
    But keep in mind, that anyway all users will get the cert warning if it not fits a known CA, is invalid, does not fit the hostname etc. anyway. Only _after_ establishing the ssl conn the rewrite request will be processed.

    Also this config needs to be done for every user (afaik you can not set those rewrite rules for all vhosts from a global base?!)
     
  3. n0fx

    n0fx New Member


    For the code above, do I edit it in the .htaccess file in the root to have my site go from https:// to http://?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit or add the .htaccess file which is in the web directory.
     
  5. n0fx

    n0fx New Member

    This is a weird issue with my server http crashes

    I tried editing the /var/www/web1/.htaccess file but it doesn't work. I also found another directory that had the .htaccess file which was /var/www/www.mywebsite.com/web/.htaccess. I edited the /var/www/web1/.htaccess file first and I found out the file in /var/www/web/www.mywebsite.com/ also got modified with the same information?

    When I added the code, it doesn't forward the user to the http:// part of the website. it would not load at all, it just times out. I just commented out the modification in the /var/www/web1/.htaccess file, since it didn't work.

    I'm having this weird issue, when a user tries to load the https:// portion of the site (it's not setup with SSL at all, I had the user with SSL checked under their account in ISPconfig but never setup the SSL for it, there is no certificate installed), it crashes the http:// part of the site. What I mean is that I can't load the http:// part of the site anymore, it just times out on the browser.

    The only way to get it back up and running is to manually reboot the server. I tried to restart the apache service with /etc/init.d/apache restart but it doesn't fix the problem. I can ping the external dns/ip name and it responds back with a ping but just doesn't answer the normal http:// requests.

    My server is configured with two network cards, one has an internal IP address and the other is directly connected on the net (external ip). When the http:// part of my site crashes/stops responding, I can still access the ISPconfig webpage and when I type in the internal ip address in the browser, it loads up the message that says that it's a shared IP address.

    Does anyone know why when sometime loads the https:// part of the site, it causes my non ssl http:// to stop loading?
     

Share This Page