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

Url with qa-rewrite is still there after moving website to another server. Why my .htaccess is not working?

Options -Indexes

DirectoryIndex index.php

<IfModule mod_rewrite.c>

RewriteEngine On

#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]

RewriteCond %{HTTPS} !=on [OR]

RewriteCond %{HTTP_HOST} ^name\.com$ [NC]

RewriteRule ^.*$ https://name.com%{REQUEST_URI} [R,L]

</IfModule>

Q2A version: 1.8.5
related to an answer for: Strange bahevior when rewrite.
closed with the note: solved
by
#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]

above and below part code not working together properly.I will close q to answer but you amy add comment thanks.

RewriteCond %{HTTPS} !=on [OR]

RewriteCond %{HTTP_HOST} ^name\.com$ [NC]

RewriteRule ^.*$ https://name.com%{REQUEST_URI} [R,L]
...