Forum Moderators: phranque
A quick question.
I know that the best way of getting the SE's to index a dynamic database driven pages is to create static pages and add links to the dynamic pages.
The problem with this is that the page titles and meta descriptions for each dynamic page do not change from one page to the next - they all have one generic title etc..
How do you assign unique titles and metas to each dynamic page? Can this be done by adding 'title' & 'description' fields into the database?
Thanks in advance!
Can this be done by adding 'title' & 'description' fields into the database?
Yes!
I know that the best way of getting the SE's to index a dynamic database driven pages is to create static pages and add links to the dynamic pages.
Not really true. The best way is to create static-looking URLs and then use some server-side solution to map the good-looking URL to the script with the variables usable.
Example:
BAD: /products.php?prod_category=widgets&prod_id=green-widget
GOOD: /products/widgets/green-widget.html
But, no good because the file doesn't really exist right? True, but with Apache mod_rewrite you can map the URL to it's usable counterpart.
RewriteRule ^products/(.*)/(.*)\.html$ /products.php?prod_category=$1&prod_id=$2
That rule will silently redirect the request to the script with all the variables back in place and usable.
There are way to do this with MS servers as well.
Cheers,
Birdman
i.e. www.site.com/blue_widget.htm
Extract “blue” and “widget”
Pass over to template i.e. diaply_product.asp and extract the product from the DB using Blue widget as the unique identifier.