Posts Tagged ‘mod_rewrite’

rewriting my history

Sunday, January 18th, 2009

Recently I got this page working

http://computercomparer.com/sitemap.xml

It builds a dynamic sitemap along the lines of what I did for holaservers.  I query the database and find all the categories and products for the site.  So that happened a week or so ago.  Today I changed the product links to hopefully be more google friendly.

Before looked like this

http://computercomparer.com/cgi/shop/product?product_id=138

After looks like this

http://computercomparer.com/ap/0743251547/be+prepared+a+practical+handbook+for+new+dads

A couple I hope improvements to point out

  1. the before link is tied to my internal product id, so if I have to recreate my database, the links are hosed.
  2. the after link is tied to amazon’s asin
  3. some title text shows up in the link
  4. kind of a funny picture on the product
  5. I am actually, a relatively new dad; perhaps I should order the book
  6. that link was just the first one on my sitemap
  7. not sure why that book is in my computer category hierarchy, but there you go

Another point is that even though I plan to add more affiliates, which wouldn’t be asin based, I decided to be a little agile, and just write to what I’ve got.  I also think that once I add say buy.com, most of the stuff will likely be sold at amazon and have an asin.  Guess I need to think of a way to handle things at buy or newegg but not at amazon.  But not much more tonight.

And yes, I use mod_rewrite to go from my after link to something a little more server-friendly.

Enjoy!

Earl