302 Language Redirect SEO issue

Tez Oner

Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / [url="http://va-mds.com"]http://va-mds.com[/url]

Luisehahne

Tks. Fixed in coming WB283 SP6

Dietmar
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

Tez Oner

Hey,

had some 'funny' issue discovered by a 'SEO optimise company'. I seems that WB
(when using multi-languages) redirect the page with a header 302 status - not that
good as it won't return a 200 OK.

It turns out that the issue lays in:

/framework/class.frontend.php - line ~ 139

There is:

if ($this->page['language']!=LANGUAGE) {
if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { // check if there is an query-string
header('Location: '.$this->page_link($this->page['link']).'?'.$_SERVER['QUERY_STRING'].'&lang='.$this->page['language']);
} else {
header('Location: '.$this->page_link($this->page['link']).'?lang='.$this->page['language']);
}
exit();
}


So dependent on the language it redirect, but in this way it would be an 302. Better would be
deleting the whole part (no 301 / 302 but directly a 200 OK). But as 301 are fine it also can be:

if ($this->page['language']!=LANGUAGE) {
if(isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { // check if there is an query-string
header("HTTP/1.1 301 Moved Permanently"); // ADDED
header('Location: '.$this->page_link($this->page['link']).'?'.$_SERVER['QUERY_STRING'].'&lang='.$this->page['language']);
} else {
header("HTTP/1.1 301 Moved Permanently"); // ADDED
header('Location: '.$this->page_link($this->page['link']).'?lang='.$this->page['language']);
}
exit();
}


Like this pages return a 200 OK status.

Some checkers:
https://monitorbacklinks.com/seo-tools/http-header-status-check
http://www.redirect-checker.org/index.php


Cheerz,

Tez Oner
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / [url="http://va-mds.com"]http://va-mds.com[/url]