Geo Redirect Error: "Cannot modify headers – Headers already sent"
-
Hi,
I have previously used Geo Redirect successfully, but went through a phase of not needing the redirect function.
I am now trying to reactivate the plugin, as I now have multiple languages on my site, but this error keeps being returned and prevents my whole site from working:
Warning: Cannot modify header information – headers already sent by (output started at /home/content/66/10542066/html/wp-content/plugins/geographical-redirect/geoip/geoip.inc:1567) in /home/content/66/10542066/html/wp-content/plugins/geographical-redirect/geo-redirect.php on line 253
Lines 249-255 are:
249 private function redirectTo($to) 250 { 251 $this->beforeRedirect(); 252 $to = $this->sanitizeRedirect($to); 253 header("Location: " . $to); 254 exit; 255 }
I using WordPress Multi-Language (WPML) and I know that that has a redirect function based on browser language, but I do not want to use that, I need location based redirect. From reading the other support posts, I notice that there may be a conflict between WPML’s redirect code and Geo Redirect’s.
The crazy thing is that even when I deactivate ALL plugins I have and activate ONLY Geo Redirect, the error persists, which confuses me as I thought this would normally avoid a conflict like this.
Any help would be much appreciated!
Thanks,
Richard
- The topic ‘Geo Redirect Error: "Cannot modify headers – Headers already sent"’ is closed to new replies.