Jump to content

Search Engine Optimization


Guest

Recommended Posts

Does anybody have insight into the effects of the question marks, equal signs etc... that are in my link addresses on the search engines? I'm trying to optimize my sight and have heard these characters fumble the search engines. Your thoughts and suggestions are GREATLY appreciated.

Link to comment
Share on other sites

Hi There Pete,

i stumbled over a nice PHP class that could do all the work for you.

It's written as freeware by Llorenç Herrera as stated in the code.

Here it is..

<?



	$GLOBALS["INCLUDED_LIBS"]["STATIZIER"] = true;



	/**

	* Statizier. A simple way to hide dinamic sites to web spiders so they can index it.

	*

	* Almost all web-spiders (like Google) can't index dinamic sites, because the parameters present on almost all links in the site.

	* This class, along a simple modification onto your Apache configuration file, allows yo to hide all the parameters and dinamic-like links and URLs of your site, so all web spiders will catch it.

	* Best of all, this will not take you too work to get this working into your dinamic site.

	*

	* Look at http://phpspain.hexoplastia.com/projects/statizier for full documentation on how to work with statizier

	*

	* @author  Llorenç Herrera <[email protected]>

	* @version  1.0

	* @package  statizier

	*/

	class statizier

	{

  

  var $redirector_query_fragment;

  var $dot_replacer;

  var $section_parameters_separator;

  var $parameters_separator;

  var $parameters_equal;

  

  function statizier

  (

  	$redirector_query_fragment  = "/statizier",

  	$dot_replacer    	= "_dot_",

  	$section_parameters_separator	= "_params_",

  	$parameters_separator  	= "__",

  	$parameters_equal    = "_"

  )

  {

  	$this->redirector_query_fragment  = $redirector_query_fragment;

  	$this->dot_replacer      = $dot_replacer;

  	$this->section_parameters_separator  = $section_parameters_separator;

  	$this->parameters_separator    = $parameters_separator;

  	$this->parameters_equal    	= $parameters_equal;

  }

  

  function getquery()

  {

  	return $GLOBALS["HTTP_SERVER_VARS"]["REQUEST_URI"];

  }

  

  function dorequest()

  {

  	$query = $this->getquery();

  	

  	// Strip redirector_query_fragment

  	$query = substr($query, strlen($this->redirector_query_fragment));

  	

  	// Replace dots

  	$query = str_replace($this->dot_replacer, ".", $query);

  	

  	// Divide file from parameters

  	list($file, $parameters) = explode($this->section_parameters_separator, $query);

  	

  	// If there are parameters

  	if($parameters != "")

  	{

    // Parse them into an array

    // Get tokens

    $atokens = explode($this->parameters_separator, $parameters);

    while(list(, $token) = each($atokens))

    	$aparameters[] = explode($this->parameters_equal, $token);

    if(!is_array($aparameters))

    	$aparameters = null;

  	}else

    $aparameters = null;

  	

  	$this->redirect($this->buildrealquery($file, $aparameters));

  }

  

  function buildrealquery($file, $aparameters)

  {

  	$retr = $file;

  	if(is_array($aparameters))

  	{

    $retr .= "?";

    while(list(, $parameter) = each($aparameters))

    	$retr .= $parameter[0]."=".$parameter[1]."&";

    $retr = substr($retr, 0, strlen($retr)-1);

  	}

  	return $retr;

  }

  

  function redirect($url)

  {

  	header("location: $url");

  }

  

  function buildquery($file, $aparameters)

  {

  	list($domain, $file) = $this->dividequery($file);

  	$file = str_replace(".", $this->dot_replacer, $file);

  	if(is_array($aparameters))

  	{

    $parameters = $this->section_parameters_separator;

    while(list($name, $value) = each($aparameters))

    	$parameters .= $name.$this->parameters_equal.$value.$this->parameters_separator;

    $parameters = substr($parameters, 0, strlen($parameters)-strlen($this->parameters_separator));

  	}

  	return $domain.$this->redirector_query_fragment."/".$file.$parameters;

  }

  

  function buildquery_fromhttp($query)

  {

  	list($domain, $request) = $this->dividequery($query);

  	$retr = str_replace(".", $this->dot_replacer, $request);

  	$retr = str_replace("?", $this->section_parameters_separator, $retr);

  	$retr = str_replace("&", $this->parameters_separator, $retr);

  	$retr = str_replace("=", $this->parameters_equal, $retr);

  	return $domain.$this->redirector_query_fragment."/".$retr;

  }

  

  function dividequery($query)

  {

  	if(stristr($query, "http://"))

  	{

    $query = substr($query, 7);

    $firstslash = strpos($query, "/");

    $domain = substr($query, 0, $firstslash);

    $file = substr($query, $firstslash+1);

    return array("http://".$domain, $file);

  	}else

    return array("", $query);

  }

  

  function error($string)

  {

  	echo "<b>Statizier error:</b> ".$string."<br>";

  	die;

  }

	}



?>










and this is the code you need to put in to run it...






<?	



	define("LIBDIR", "/www/htdocs/lib/");

	include LIBDIR."statizier/statizier.class.php";

	

	$statizier = new statizier();

	$statizier->dorequest();

	

?>

Best of luck!

BTW the link http://phpspain.hexoplastia.com/projects/statizier does not exist anymore

Link to comment
Share on other sites

It simply converts a dynamic URL such as blah.com?what=1&when=3

to something without punctuation (I think by fooling it in to virtual folders ie blah.com/1/3/) so that SE robots can read them better.

Apparently a thing called Apache mod_rewrite does a similar thing at server level.

But from the research I've just done, this isn't an issue for Google since April 2003 and certainly not for Cubecart which only has one dynamic element (ie one equal sign)

Google's own webmaster FAQ says something similar.

These links might interest some of you ....

http://www.webpronews.com/ebusiness/seo/wp...namicPages.html

http://www.webmaster-forums.net/archive/index.php/t-25565

http://www.webmasterworld.com/forum3/12370.htm

The last point on page 3 also infers that trying to fool Google that you have static pages, will undo the work that Google have done to actually index dynamic sites. :)

Link to comment
Share on other sites

Guest OskMedia

ok so on my site supplierfind link is in my sig, i got the title mod installed, and alot of good keywords on the index page waht more could i do to help it in search engines?

Link to comment
Share on other sites

  • 3 weeks later...
Guest OskMedia

hey this works real nice, i was tyring to do trhat mod re write thing but this works real nice, mod_rewrite is fro m a server level and osme thing COULD conflict probably but this works nice thanks author lol the google spider loves my site so does the yahoo and the orher 200 google claims they donm't index anymore but they really do, they are a little better but this will really help you, oskmedia

Link to comment
Share on other sites

Guest OskMedia

No I do not. I have contacted them and they have contacted me back i guess they are making an update, but yea it works perfectly ranking ^ 3,000 in 4 days, before ^ 4,00 in 2 weeks. So yea it does help you, --------OskMedia

*gramatically correct

Link to comment
Share on other sites

Hi all !!!

I'm fairly new and inexperienced in the use of php but I'm interested in giving Statizier a try on my site.

Can anyone give me some quick, consise instructions (designed for a virtual newbie) on how to impliment Statizier with CubeCart ?

Thanks

Doug

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...