Re: search engine listings from php pages
| From: | Steven Werby | Date: | Wed, 09 Aug 2000 02:30:23 +0000 |
| Subject: | Re: search engine listings from php pages | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10829@lists.php.net to get a copy of this message | ||
Sue Bailey <sue@bartandsue.co.uk> wrote:
> Forgive me if I have this wrong, but I think a couple of weeks ago,
> Rasmus recommended making a special page for search engines to
> spider with every possible result from a db query, then to send the
> search engine spider off to pick up all the links, and hey presto your
> entire stock is listed!
I've used this method for my own internal search engines. Works like a charm.
Especially since web pages that aren't linked from a URL sent to a search engine
will never be spidered and indexed by the search engine since it won't be able
to find them.
> I've read the altavista pages about this, and
> they imply they have a problem with urls that contain ? , with special
> reference to ASP.
A lot of search engines ignore URLs that *appear* dynamically generated, like
most URLs containing a ? following by a string. I've worked around this
obstacle on a few sites by using the PHP variable $REQUEST_URI and the explode()
function to build an array based on directories within a site's URLs and then
use the array values to feed to a MySQL query which generates the page
dynamically. Using Apache AliasMatch commands in my Apache config. file
(probably works on .htaccess level, too) I can then route an infinite number of
similar web pages with different static-looking URLs to a single PHP script that
generates all of the pages dynamically and makes all search engines happy.
> I don't want to spam the index, I just want to get
> my dynamically generated pages listed! Is a/v telling the truth, or was
> Rasmus right?
Altavista chooses not to index pages with a ? in them so do what I do as a
workaround. Plus your URLs will look much cleaner. Hope that helps.
Steven Werby {steven-lists@befriend.com}