Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
718 views
in Q2A Core by
Hi, my website is installed in the folder path like site.com/qa , and i have https for my root domain, but when i open site.com/qa it was not redirecting to https, so how can i redirect it? thanks in advance.

Best regards,
Raja.
Q2A version: 1.7.5

1 Answer

+1 vote
by
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteRule ^(files)($|/) - [L]
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
</IfModule>

1) open you .htaccess file wich is on root of your site
2)Than copy and paste the above code
...