pulsedriver Posted March 11, 2007 Share Posted March 11, 2007 For a certain reason I want to insert a PHP redirect at the end of a HTML page. Since the headers have already been sent, I can't use Header Location (I don't control the HTML above the PHP script, so I can't turn on output buffering). Is there an alternative way to redirect to another URL that won't give me the "cannot modify header information" message? Link to comment https://forums.phpfreaks.com/topic/42275-alternative-redirect/ Share on other sites More sharing options...
JasonLewis Posted March 11, 2007 Share Posted March 11, 2007 the <meta> tag in html, the javascript window.location, there are a few out there. Link to comment https://forums.phpfreaks.com/topic/42275-alternative-redirect/#findComment-205074 Share on other sites More sharing options...
pulsedriver Posted March 12, 2007 Author Share Posted March 12, 2007 Yes, but is there any way to do it server-side? I want to be sure that everyone gets redirected, even if they have javascript disabled. Link to comment https://forums.phpfreaks.com/topic/42275-alternative-redirect/#findComment-205348 Share on other sites More sharing options...
skali Posted March 12, 2007 Share Posted March 12, 2007 You have to enable buffering for the purpose. Link to comment https://forums.phpfreaks.com/topic/42275-alternative-redirect/#findComment-205350 Share on other sites More sharing options...
DanDaBeginner Posted March 12, 2007 Share Posted March 12, 2007 I suggest you use AJAX and PHP... Link to comment https://forums.phpfreaks.com/topic/42275-alternative-redirect/#findComment-205352 Share on other sites More sharing options...
skali Posted March 12, 2007 Share Posted March 12, 2007 AJAX is all client side code... with data from server. Link to comment https://forums.phpfreaks.com/topic/42275-alternative-redirect/#findComment-205353 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.