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