The usual route is to add a RewriteRule to the .htaccess file in the web root of your server, although there are at least several hundred other ways to do it depending on a lot of things.
Could you provide some additional information, including what platform you're using, what application you're doing this for, what you have tried already, and so forth.
If your server is Apache, here's a link to the rewriting guide [httpd.apache.org...] (actually, it's a link to the guide even if your server isn't apache ... but perhaps more relevant to you if your server is apache :-)
Use mod_rewrite's RewriteRule directive, or use mod_dir's Redirect or RedirectMatch directives.
Please see the resources cited in our Apache Forum Charter and the examples and tutorials posted in our Apache Forum Library. If you have any difficulty, please post your best-effort attempt at coding a solution, along with your test procedure and test results for discussion.
g1smd -- thanks for the correction -- you're right about those directives.
The second argument to RewriteRule (or RedirectMatch which I have now looked up) is a regular expression. Search "regular expressions" for more. (Warning: Regular expressions are a little joke played on people who have to make computers work in order to make us humble and feel unworthy. They are, however, a necessary evil.)
Various characters are used to form regular expressions, including the "." which means "a character" in regex patterns. If you want the pattern to match only on a period, you need to escape it with a backslash.
Without the escape, the pattern would also match "/old_imageXjpg" as well as "/old_image.jpg".
The ^ means that the match must start with the characters specified, and the $ means that it must end with the characters specified.
Without ^ and $, "/something/else/old_image.jpgsareimagefiles" would also match.
In short, they are they make sure your pattern matches exactly, and only, what you want.
Our Apache Forum Charter has a link to a concise regular-expressions tutorial and to the Apache mod_rewrite documentation. Proceeding to change your server configuration (which is what server config and .htaccess do) without reviewing those documents can be very harmful to the operation of your site and to its search rankings...
The example code previously posted is for use in a server config file outside of any <Directory> containers. For use in .htaccess or in server config file within a <Directory> container, remove the leading slash from the RewriteRule pattern. This caveat is necessary whenever it is not made clear where the code is to be placed.