Re: Submitting my PHP/MYSQL driven Web Site to search engines.
| From: | Koos van den Hout | Date: | Mon, 08 Jan 2001 15:55:39 +0000 |
| Subject: | Re: Submitting my PHP/MYSQL driven Web Site to search engines. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-5706@lists.php.net to get a copy of this message | ||
Quoting Paul O' Connor who wrote on Mon, Jan 08, 2001 at 03:12:40PM -0000:
> I have a dynamic website driven by PHP/MySql. The site is complete and ready
> to submit to the search engines. However, as the site is dynamic and the
> links are generated from the database, the web crawlers won't be able to
> 'crawl' my site beyond a couple of static pages.
>
> Any tips on how to get around this problem?
What I did for http://www.virtualbookcase.com/ was to
take the advice from
http://www.phpbuilder.com/columns/tim19990117.php3
.. the idea is to use
URL's which don't look like dynamic data to a search engine (and make sure
they don't act like it either).
The relevant config bit in apache is:
<Location /book>
ForceType application/x-httpd-php3
</Location>
/book (without! .php3) is a php3 script containing:
$url_array=explode("/",$REQUEST_URI);
$url_todo=$url_array[2];
if ($url_todo==""){
urlerror();
} elseif ($url_todo=="detail"){
$url_bookid=$url_array[3];
if ($url_bookid){
include("include/detail.inc");
exit;
} else {
urlerror();
}
(code snippets, more code is there which does the same for other sub
url's). The script include/detail.inc uses $url_bookid for further
processing. Which means http://www.virtualbookcase.com/book/detail/1
will
do a query for the book with id '1'.
All url's look very 'static' which means search engines do index the
complete site and give me a good ranking on titles of books and names of
authors.
All this does mean it's something you have to design into the site from the
very start.
There is also a followup article in
http://www.phpbuilder.com/columns/tim20000526.php3
Koos
--
Koos van den Hout, PGP keyid RSA/1024 0xCA845CB5 via keyservers
koos@kzdoos.xs4all.nl or DSS/1024 0xF0D7C263 -?)
Fax +31-30-2817051 Visit my site about books with reviews /\\
http://idefix.net/~koos/ http://www.virtualbookcase.com/ _\_V