: I've changed my site's domain, created a redirect, but old URLs result in 404 I've changed the domain of my site, created a redirect, but it seems to work only partially. That is, when I
I've changed the domain of my site, created a redirect, but it seems to work only partially. That is, when I go to example.co.il (old) I do get to example.biz (new).
But when I go to example.co.il/just-a-nice-webpage-111 I get a 404?
Please tell me what can cause it, here is my domain.co.il folder htacess syntax:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.co.il$ [NC]
RewriteRule ^(.*)$ example.biz/ [R=301,L]
More posts by @Deb1703797
1 Comments
Sorted by latest first Latest Oldest Best
In order for this to work, you must retain the example.co.il domain and place the following redirect code in your .htaccess within the example.co.il web root.
RewriteEngine on
RewriteRule ^(.*)$ example.biz/ [L,R=301]
You do not need to check the host name.
If you make a request for a page that does not exist on domain.biz you will get a 404 error as you should. This is correct.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.