NZ_Kiwis;11014369 wrote:What if it wasn't articles but say a shopping category or product ID?
At least as much reason to keep consistent URLs as for articles. If someone does a web search for "SomeProduct", I'd definitey want the search engine to point them to my URL with that product.
Moreover, if a page for an article, product or anything eles for that matter, ever changes (permanentely), you should respond with
HTTP/1.1 301 Moved permanentley, followed by a location header. This way, you ensure that your stuff will still be found.
The only reason I can think of to do anything with resource URLs is when they give direct (as in non-scripted) access to resources on which you wish to impose some kind of limitation, such as a pay per view video. If you, after a user somehow has paid you with an online transaction, show them a page with a video element, whose source is http://example.com/video.mp4, it won't take much time before other people will request the video without going through your payment page.
On the other hand, you still don't have to muck around with changing URLs, but what you do is provide a source of http://example.com/streamvideo.php?file=video.mp4. That script is told which video to send to the user, and before doing so it can check that the user is allowed to see it. You just make certain that "video.mp4" is not found in the web root on that server. The actual file doesn't have to be "video.mp4", it could be anything. Also, it doesn't even have to reside on the same domain. The script just needs a way to look up the correct URL or file path to it, fetch the data and relay it to the user.