WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • 302 Language Redirect SEO issue
  • Print
Pages: [1]   Go Down

Author Topic: 302 Language Redirect SEO issue  (Read 190643 times)

Offline Tez Oner

  • Posts: 257
  • "...it's possible..."
    • VA-MDS / MMO | communications
302 Language Redirect SEO issue
« on: February 11, 2016, 10:01:59 PM »
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:

Code: [Select]
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:

Code: [Select]
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
Logged
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / http://va-mds.com

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: 302 Language Redirect SEO issue
« Reply #1 on: February 12, 2016, 11:26:38 AM »
Tks. Fixed in coming WB283 SP6

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

Offline Tez Oner

  • Posts: 257
  • "...it's possible..."
    • VA-MDS / MMO | communications
Re: 302 Language Redirect SEO issue
« Reply #2 on: February 12, 2016, 05:14:48 PM »
Quote from: Luisehahne on February 12, 2016, 11:26:38 AM
Tks. Fixed in coming WB283 SP6

Dietmar

Cool.

Cheerz,

Tez Oner
Logged
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / http://va-mds.com

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • 302 Language Redirect SEO issue
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2