How to redirect HTTP to HTTPS

Discussion in 'Installation, setup and upgrading' started by B3taboy, Apr 22, 2016.

  1. B3taboy

    B3taboy New Member

    I just moved my site to HTTPS.
    How do do do the .htaccess redirect?
     
  2. PHPTRAVELS Staff

    PHPTRAVELS Staff Administrator Staff Member

    Hello

    thanks for your question.
    I have attached .htaccess file just replace it with your root files and it will redirect to .htaccess

    Thanks.
     

    Attached Files:

  3. PHPTRAVELS

    PHPTRAVELS New Member

    I hope it has been fixed the issue ?
    thanks
     
  4. Pietro Albano

    Pietro Albano New Member

    Hello dear,
    using your .htaccess the following error rices:

    ERR_TOO_MANY_REDIRECTS.

    can u help me pls?
     
  5. baresound

    baresound New Member

    Hey Pietro,

    use the attached htaccess file. Works perfectly for me.
     

    Attached Files:

  6. Upendra Yadav

    Upendra Yadav New Member

    Its not working.
     
  7. AirocityTravels

    AirocityTravels New Member

    you can redirect by 301 and 302 processes.
     
  8. Admin

    Admin Member

    Hello

    please paste below code to your htaccess and it will work fine :
    and do not forget to remove previous code.

    RewriteEngine on
    ExpiresActive On
    ExpiresDefault A2592000
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteCond $1 !^(index\.php|images|public|assets|uploads|themes|install|updates|asset|mob|robots\.txt)
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
     

Share This Page