Forum Moderators: open
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.
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]";