Page is a not externally linkable
- Marketing and Biz Dev
-- Deprecated - Search Engine Submission
---- PHP and Search Engines


double0seven - 3:05 pm on May 4, 2001 (gmt 0)


I understand that it is diffcult for engines to spider links with ? marks in the url. I found this piece of code awhile back and have known some folks to have some success with it.

//This only works with apache module.
$HTTP_TEMP_PATH_VARS = explode("/",$PATH_INFO);

array_shift($HTTP_TEMP_PATH_VARS);
reset($HTTP_TEMP_PATH_VARS);

$HTTP_PATH_VARS = array();

while( list($index,$key) = each($HTTP_TEMP_PATH_VARS) ) {
list($index,$val) = each($HTTP_TEMP_PATH_VARS);
$val = urldecode($val);
$HTTP_PATH_VARS[$key] = $val;
$$key = $val;
}

?>
Example
Instead of 'http://www.server.com/page.php?id=14&this=that'
you may use 'http://www.server.com/page.php/id/14/this/that'

and still have access to $id and $this.


Thread source:: http://www.webmasterworld.com/submission/191.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com