SSL https password page question

First of all, I love this Zenphoto tool. You did just such a great job in creating this!
My question is the following. I have been trying to set up the Zenphoto site on a SSL https:// connection. When I am logged out and I type my url with the http:// it still redirects me to the non-protected http://, while it should redirect me to the https:// url. I have selected the https function in the security section and I have set up the gallery page path to https. I know my server is set up correctly because when I reach the admin section it turns into https and when I type in the url with https it works fine. The question is why does the password.php page not redirect over from http:// to https:// when I type in the url with http//:.

Your help/advice would be very much appreciated

Comments

  • acrylian Administrator, Developer

    If you like to redirect http to https addresse in general you need to do this server side. You would have to add something to your htaccess file for example.

    Zenphoto would generate all links using https instead of http but it does not redirect in general.

  • Mory Member

    you can help me how to configure zenphoto from http to https the site

  • acrylian Administrator, Developer
    edited March 2018

    You have to have a server supporting https and a valid certificate. Then you just have to set the option on Zenphoto. Please ask your host about https.

  • Mory Member

    Supports ssl already added to my other sites on the servers of my hosting

  • acrylian Administrator, Developer

    Then you just have to change the protocol on Zenphoto's options: Options > Security > Server protocol.

    That will cover all links Zenphoto generates. Manual links you of course have to update manually, too.

  • cangevendi Member
    edited June 2018

    Hello,

    My website already set the option > security > server protocol to https and i already can access my website using https. however my website is still accessible using http address. how to redirect from http to https ? i tried this code from site ground https://www.siteground.com/kb/how-to-force-ssl-with-htaccess/

    but it didn't work, what's the correct code i should add to my .htacess ?

    Best Regards,
    Cang

  • MarkRH Member
    edited June 2018

    Since changing my gallery over to https, I have this at the top of my .htaccess:

    <IfModule mod_rewrite.c>
       RewriteEngine On
    
       RewriteCond %{HTTPS} off
       RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
    
       RewriteBase /
    
    ....
    </IfModule>
    

    It's the same as the place you linked so something is probably wrong with your .htaccess file. What are its contents currently?

  • acrylian Administrator, Developer

    Actually Zenphoto's htaccess doesn not cover force redirecting http to http. Same for non-www to www addresses or vice versa.

    If you need this you have to add it to the htaccess file manually or check if your server can handle this for you via your host's settings. Ours for example does this server side without anything to do. So our htaccess file looks as ever. I suggest to ask your host how they do this.

  • cangevendi Member
    edited June 2018

    Hello,

    @MarkRH my .htaccess file is the same as when we install new zenphoto. I add those code you mentioned between RewriteEngine On and RewriteBase / which is already on .htaccess because i read it from someone on quora that i don't need to add RewriteEngine On if it was already there and to make sure i place the code below RewriteEngine On. if i use those code and try to visit my website the browser will say domain.com redirected you too many times.

    @acrylian my host cannot help me, they added redirect code and get error so they told me to find you.

    Best Regards,
    Cang

  • acrylian Administrator, Developer
    edited June 2018

    @cangevendi: I can also only point you to resources like this for http to https redirection: https://stackoverflow.com/questions/5883226/apache-https-to-https-redirection
    Zenphoto does not have any special requirements here.

    The redirection actually should come after the RewriteBase naturally. Since that is involved. It is empty if installing in the root of a domain (http://www.example.com) and contains the folder name if installing in a subfolder (http://www.example.com/zenphoto/).

  • vincent3569 Member, Translator

    If it may usefull for other:

    my host gives my the following code for my .htacess

    <IfModule mod_rewrite.c>
      RewriteEngine On
    
      # Redirection to HTTPS
      RewriteCond %{SERVER_PORT} ^80$ [OR]
      RewriteCond %{HTTPS} =off
      RewriteRule ^(.*)$ https://www.domaine.fr/$1 [R=301,L]
    
      # Redirection from non-www to www with HTTPS
      RewriteCond %{HTTP_HOST} ^domaine.fr$
      RewriteRule ^(.*)$ "https://www.domaine.fr/$1" [R=301,L]
    </IfModule>
    
  • acrylian Administrator, Developer

    Surey, it depends on the host so user should ask there first. On our for example you set it on the webspace backend without any htaccess addition required.

Sign In or Register to comment.