What are the standards for managing URL redirects if you base your URL's off properties of the data that might change a few times, like the "title"?
I have a website with lots of images and I want to make the urls look like this:
http://www.mySite.com/images/132123/my-cool-image-title
Now say a bunch of people bookmark the image, and a week later I change it to:
http://www.mySite.com/images/132123/renamed-image-title
So now there has to be a redirect for the people that bookmarked the old one... Now lets say that happens on average 3 times per image. That means I'd have lots and lots of redirects to map. I'd have a database of redirects it seems.
What is best practice in this case, assuming I want to use pretty urls and not base it on some universally unique id, and that I'd like to reap as many benefits of SEO as possible?
Well I don't know what the downvote was about, this seems like a perfectly valid question to me.
My recommendation would be that if you know in advance you will be changing the data, it probably shouldn't be in the URL in the first place. If this is a requirement (perhaps its important for SEO or you are creating a blog or something, you have some choices:
slug
field where the URL text is stored, separate to the post's actual title.If possible changes and backwards compatibility are a requirement, I'd go with something like option 3. Its certainly better to have it built in to your app than have to manage growing .htaccess files full or URL rewrite rules or something.