Forum Moderators: open

Message Too Old, No Replies

Developing a Database Driven Site wrt SEO

What factors do I need to consider when developing a new directory site?

         

netnerd

5:36 pm on Mar 30, 2003 (gmt 0)

10+ Year Member



A client of mine is developing a large portal covering many topics. She wants me to oversee the optimisation of this portal. As the portal is database driven and covers a broad range of topics, it is a daunting task to try and optimise it for everything.

Does anyone have any guidlines on how to proceed with a project of this size? Id be interested in hearing how you would suggest linking the database to the main pages.

figment88

6:30 pm on Mar 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think the first order of business in developing a database driven site is to figure out whether you want to dynamically generate the pages or periodically push the data through templates to make static pages.

With either approach you can do page optimization by including important fields in the database. For example, I usually have a title field that get automatically used for both the page title and a H1 tag at the top of the page. For meta description, I'll draw the first 150 characters from a relevent text field in the database.

If you go with dynamically generated pages, you almost certainly want to transform the URL strings. I use mod_rewrite to point every request a single php script that reads the request uri to determine query parameters.

For example,

I turn on mod_rewrite in my .htaccess file


RewriteEngine on
RewriteBase /
RewriteRule ^(img¦obj¦admin).* - [L]
RewriteRule .* /products.php

Now the following url's will call the php script products.php


www.dynamsite.com/widgets/blue
www.dynamsite.com/widgets/red

Products.php has some lines like


$url=strip_tags($REQUEST_URI);
$url_array=explode("/",$url);
$sql="select * from products where category=$url_array[1] and product=$url_array[2]";