techker Posted July 31, 2006 Share Posted July 31, 2006 hey guys is there a way to forward a page to another automaticly?cause the domain name that i got goes to the wrong site(i have 2 )i need to so when it goes to the wrong site it is sent to the good one? Link to comment https://forums.phpfreaks.com/topic/16130-forwarding/ Share on other sites More sharing options...
pedrobcabral Posted July 31, 2006 Share Posted July 31, 2006 <?php echo "<script>window.location='http://goodsite.com';</script>"; ?> Link to comment https://forums.phpfreaks.com/topic/16130-forwarding/#findComment-66540 Share on other sites More sharing options...
SharkBait Posted July 31, 2006 Share Posted July 31, 2006 You can use either a meta refresh. Forget the exact HTML for it.Or you can use PHP's header function to move them[code]<?php// You can not have any text sent to the screen prior to using header();header("Location: http://mynewsite.com");exit();?>[/code] Link to comment https://forums.phpfreaks.com/topic/16130-forwarding/#findComment-66541 Share on other sites More sharing options...
techker Posted July 31, 2006 Author Share Posted July 31, 2006 [quote author=pedrobcabral link=topic=102470.msg406664#msg406664 date=1154372617]<?php echo "<script>window.location='http://goodsite.com';</script>"; ?>[/quote]thx bro works great. Link to comment https://forums.phpfreaks.com/topic/16130-forwarding/#findComment-66558 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.