I have changed domain name of my forum from abc.com to def.com now how can i redirect all my pages from abc.com to def.com? for say if visitor from google opens this page-- http://www.abc.com/forum/showthread.php?t=315493 it should be redirecred to http://www.def.com/forum/showthread.php?t=315493 what changes i should do i hta file?
If you don't know how, you probably should stick with just redirecting them to your root. Otherwise, simple code left at the head of your topic pages (on ABC.com) should do the trick: <? header("Status: 301 Moved Permanently", true, 301); header("Location: http://def.com/forum/showthread.php?t={$_REQUEST['t']}"); ?> Code (markup):
cant i trick something in htaccess files? as i have 5k pages indexed already..& i cant edit them all... So anything i can add in htaccess file? so it will redirect all pages automatically?