Mike Lewis
Programmer
Please excuse me if this is not the correct forum for my problem.
I am trying to use .htaccess to redirect an old domain to a new one. The are many pages on the old domain, all in the same root directory. For simplicity, I want to redirect each of these old pages to the home page of the new domain (which is named index.html).
I have tried several variations of the syntax, including the following:
Plus all of the above while omitting the [tt]www.[/tt] prefix.
No matter what variation I use, the result is always the same. It correctly finds the new domain, but it always goes to my custom 404 error page.
Can anyone throw any light on this. Clearly, my basic syntax is correct, otherwise it wouldn't be going to the new site, but I don't understand why the new site is always going to the 404. I am sure that index.html exists on the new site and is the default page.
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads
I am trying to use .htaccess to redirect an old domain to a new one. The are many pages on the old domain, all in the same root directory. For simplicity, I want to redirect each of these old pages to the home page of the new domain (which is named index.html).
I have tried several variations of the syntax, including the following:
Code:
Redirect 301 / [URL unfurl="true"]http://www.newdomain.com/[/URL]
Redirect 301 / [URL unfurl="true"]http://www.newdomain.com[/URL]
Redirect 301 ^/ [URL unfurl="true"]http://www.newdomain.com/[/URL]
Redirect 301 / [URL unfurl="true"]http://www.newdomain.com/index.html[/URL]
Redirect 301 / [URL unfurl="true"]http://www.newdomain.com/another_page.html[/URL]
Redirect 301 index.htm [URL unfurl="true"]http://www.newdomain.com/index.html[/URL]
Plus all of the above while omitting the [tt]www.[/tt] prefix.
No matter what variation I use, the result is always the same. It correctly finds the new domain, but it always goes to my custom 404 error page.
Can anyone throw any light on this. Clearly, my basic syntax is correct, otherwise it wouldn't be going to the new site, but I don't understand why the new site is always going to the 404. I am sure that index.html exists on the new site and is the default page.
Thanks in advance.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips and downloads