-1

I have an old webpage. Peoples find it from Google. How can i redirect all search to another domain with PHP? Example: From www.domain.com/oldnews.html to www.newdomain.com

Siki-Siki
  • 113
  • 1
  • 12

2 Answers2

1

Header will redirect.

header('location: http://www.newdomain.com');
0
header("Location: www.newdomain.com");

But, if you have shell access you are probably better off using rewrite rules rather than editing every single page individually. Read up on mod-rewrite.

Mooseknuckles
  • 497
  • 3
  • 7