Forum Moderators: phranque

Message Too Old, No Replies

Assigning titles & metas to dynamic pages

Assigning titles metas dynamic pages

         

UKSEOconsultant

1:38 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



Hi All,

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!

Birdman

2:00 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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

ipjunkie

2:12 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



If you can edit your 404 error page, you can write a script that will parse the end id from the URL and then perform a transfer to a product template page, carrying across the ID from the URL.

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.

UKSEOconsultant

2:39 pm on Oct 13, 2004 (gmt 0)

10+ Year Member



Thanks guys, I should have mentioned that I would also be using mod-rewrite. Its just the unique titles etc that I'm having problems with.

Thanks again!