views:

68

answers:

1

Experience tells me I shouldn't be storing a url in my database of media items.

However that is what my architect is telling me. Surely it is the job of a front end server to map the filepath to a url?

Any hints? What should I be considering with regard to URL rewriting?

+1  A: 

The last time I worked on a project using URL rewriting - no we did not store the actual urls in the database, but the categories (or folder names) did get stored there. It was an eCommerce site, so we had a hierarchy of categories like so:

Parent category -> Sub Category -> Product

Each of these items were stored in the database, and in the website got converted to:

http://domain/ParentCategory/SubCateogry/Product

So no the actual url was not there, but the pieces of that url most certainly did reside in the database.