Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
817 views
in Q2A Core by
Options -Indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{HTTP_HOST} ^mysite.com [NC] ---------------------> Added by me
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301,NC] --------> Added by me
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ --------------- All these are already present on the htaccess file
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
</IfModule>

The rule RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L] is creating the problem.

1 Answer

0 votes
by

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R=301]

place the above 2 lines into your .htaccess after #RewriteBase /

...