Help - Search - Members - Calendar
Full Version: Session IDs in IPB Forum
Hostony Board > General Support > General Support
Albert
We’re using Invision Power Board on our site because it was one of the packages Hostony provided.

IPB is supposed to be SE friendly. However, the Search Engines don’t seem to index the forums and the topics despite having ticked the appropriate box in the admin panel to let the SE’s crawl.

I’ve read somewhere that the session ID’s should be removed – it seems this is what’s done on the Hostony forums.

How do you remove the session ID?
Slavik
Hello.
The key is "show.php" which can be find in forum root folder. Actually it will be done by php. For example if you wich to change parameter of a scripts to be search engine friendly you may put it after the php script with a "/".

http://.../myscript.php?name=yourforum&title=webmaster

you may change it to:

http://.../myscript.php/name/yourforum/title/webmaster

Apache will pass "/name/yourforum/title/webmaster" as a GET parameter to your script and you may decode it very easily. Even more:

http://.../myscript.php/name.yourforum.title.webmaster.php

and "name.yourforum.title.webmaster.php" will be the parameter.


To decode the first example ("/name/yourforum/title/webmaster") you may use:

QUOTE

$MyPathInfo = $_SERVER['PATH_INFO'];
if($MyPathInfo != "")
{
if($MyPathInfo{0}=='/')
{
$My_c = 0;
$MyPPar = '1';
$MyPathInfo = substr($MyPathInfo,1);
foreach( explode( "/", $MyPathInfo ) as $My_bit)
{
if ($My_bit != "")
{
if ($My_c == 0)
{
$My_c++;
$MyPPar = trim($CPages_bit);
}
else
{
$My_c = 0;
$_GET["$MyPPar"] = $My_bit;
}
}
}
}
}

which used in this forum and to decode "." version use:

QUOTE

$MyPathInfo = $_SERVER['PATH_INFO'];
if($MyPathInfo != "")
{
if($MyPathInfo{0}=='/')
{
$My_c = 0;
$MyPPar = '1';
$MyPathInfo = substr($MyPathInfo,1);
foreach( explode( ".", $MyPathInfo ) as $My_bit)
{
if ($My_bit != "")
{
if ($My_c == 0)
{
$My_c++;
$MyPPar = trim($CPages_bit);
}
else
{
$My_c = 0;
$_GET["$MyPPar"] = $My_bit;
}
}
}
}
}

that you may find it in action at our sample clients section.



Both will decode the parameters to $_GET array and you may use it at your script.

This board use a similar way but a bit different, It use redirectors with "/" decoding version and just change "/"s to "?" and "&" and then pass it to main wraper:

QUOTE

$redirect = "";
if ( $_SERVER['PATH_INFO'] != "" )
{
$c = 0;
foreach( explode( "/", $_SERVER['PATH_INFO'] ) as $bit)
{
if ($bit != "")
{
if ($c == 0)
{
$c++;
$redirect .= $bit.'=';
}
else
{
$c = 0;
$redirect .= $bit.'&';
}
}
}
}
header("Location: http://my_domain.com/forum/?".$redirect);

Best regards,
Slavik koshelev
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here