Brad420 Posted September 15, 2008 Share Posted September 15, 2008 I am building a new site, and they want to keep the links to their old .htm pages active for SEO reasons. What I did was created multiple .htm files that use this code. Like this... <? header("HTTP/1.1 301 Moved Permanently"); header("Location: ../Charity%20Auctioneer%20Info"); ?> The problem I am having is it only works for one link. I did the same thing with the other links using the same code,but it doesn't have the same effect. Is this because the headers were already sent? If so is there a way around it? Link to comment https://forums.phpfreaks.com/topic/124262-php-redirect/ Share on other sites More sharing options...
M.O.S. Studios Posted September 15, 2008 Share Posted September 15, 2008 for that to work the pages have to be a .php page. try the following: <script language='JAVASCRIPT' type='TEXT/JAVASCRIPT'> <!-- if ((navigator.appName=="Microsoft Internet Explorer") || (navigator.appName=="Netscape")) { if (navigator.appName=="Microsoft Internet Explorer") window.location = "YOUR PAGE HERE"; else window.location = "YOUR PAGE HERE"; } else window.location = "YOUR PAGE HERE"; //--></script> Link to comment https://forums.phpfreaks.com/topic/124262-php-redirect/#findComment-641678 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.