[thelist] Search engines and dynamic sites using query strings

Ray Hill lists at prydain.com
Tue Jan 30 14:20:32 CST 2001


> From what I have read on the subject <snip> and seen
> from the results of searches for my company's site
> on the major search engines, only Google touches pages
> that use query strings.

You mean there are still other search engines besides Goole?  I'd almost forgotten...  ;)



> How have others approached the issue of search engines
> not indexing pages with query strings? What are people's
> opinions on the off-the-shelf tools (such as xBuilder)
> that allegedly create static versions of dynamic sites?

My solution is similar to yours, but a bit more streamlined.  Instead of publishing a static page that refreshes to the qstring version, I just publish a "static" (in the sense of no variables in the qstring) page that initializes the variables I would have put in the qstrig, and then includes the content page.

For example, if the qstring URL for a page were:

  http://example.com/flubber.php?ID=5569874532&lang=eng

I would simply make a file called:

  http://example.com/flubber_5569874532_eng.php

And have it contain the following:

  <?
  $ID = "5569874532";
  $lang = "eng";
  
  include "flubber.php";
  ?>

That way, you don't have to redirect to the qstring version (or even have one), but the search engines will still see an invariable URL.

Take this method one step further, and you can distill the majority of the look and feel of a site into just a few files.  Add a $contentPage variable to the entry file, and have it include a control file instead:

  <?
  $ID = "5569874532";
  $lang = "eng";
  $nav1 = "Primary Section";
  $nav2 = "Secondary Section";
  $content = "flubber.php";
  
  include "control.php";
  ?>

The control file then writes all of the standard look-and-feel elements (using the $nav1 and $nav2 to customize the navbar to where you are in the system), and then includes the $content page when it gets to the point where page content goes.


This method has been working exceedigly well for me thus far.

--ray





More information about the thelist mailing list