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

I edit my .htaccess file. I was move my http://szh.kz -> http://surak.szh.kz  Its true?

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://surak.szh.kz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^szh\.kz
RewriteRule ^(.*)$ http://surak.szh.kz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.surak.szh\.kz
RewriteRule ^(.*)$ http://surak.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>

 

Q2A version: 1.7.1

1 Answer

0 votes
by

please try this:

RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^http://surak.szh.kz\.com [NC]
RewriteRule (.*) http://szh.kz/$1 [R=301,L]
</IfModule>

...