Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
676 views
in Q2A Core by

Hi all. How i auto redirect my site http for https.

Today i add my site https protocol. https://szh.kz

Site open adress https://szh.kz and http://szh.kz How i auto redirect my site url http://szh.kz for https://szh.kz

My site htaccess file.

DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC]
RewriteRule ^([^/]+) $1 [L]
RewriteCond %{HTTP_HOST} ^www.szh\.kz
RewriteRule ^(.*)$ http://szh.kz/$1 [R=301,L]
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
</IfModule>

i add after RewriteEngine On code

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

But this code dont work. Help me? 

Q2A version: 1.7.1

Please log in or register to answer this question.

...