0

I have two domains, one server, the same files here and there. I want to redirect from one domain to another, but something does not work. What I write in .htaccess appears on both, as one server, the same files here and there. But the host does not have such a function and I need to through .htaccess

RewriteCond %{HTTP_HOST} ^old.ch/$ [OR]
  RewriteCond %{HTTP_HOST} ^http://old.ch/$
  RewriteRule (.*)$ https://new.ch/$1 [R=301,L]

it's work 50/50 and doesnt work in the incognito

1 Answer 1

0
RewriteEngine On

RewriteCond %{REQUEST_URI} (.) RewriteRule ^(.)$ http://new-domain.tld/$1 [L,R=301]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.