How to add a http to https redirect in the website?

Discussion in 'Server Operation' started by Alex Hulshof, Jun 4, 2015.

  1. Alex Hulshof

    Alex Hulshof Member

    On Perfect Ubuntu server 15.04 apache, mysql .... ispconfig latest version.
    In Ispconfig I see the on the Web Domain of my server tab 3 redirect entries:
    1. Redirect Type:
    2. Redirect Path
    3. SEO Redirect
    What should I put in each of these to achieve the proper redirect?
     
  2. Alex Hulshof

    Alex Hulshof Member

    Cannot get it to work. Please help me again
     
  3. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If you want to force one site to https, add this to the apache directives:
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
     
    Marcin Warnacki likes this.
  4. Marcin Warnacki

    Marcin Warnacki New Member

    Code:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.domain.pl/$1 [R,L]
     
    Tebim likes this.
  5. Alex Hulshof

    Alex Hulshof Member

    Thanks for the help.
    It works perfectly!
     
  6. Marcin Warnacki

    Marcin Warnacki New Member

    cool
    regards
     

Share This Page