Moving content from dev directory to production server When developing websites for clients, each developer has all sites under a relative path in his htdocs dir:


/client1site/
/client2site/
/clientsite/ and so on


Most links within the drupal installation, in content or image srcs have to be absolute to this path: /client1site/en/a-nice-article/ in order to work. 

But when client 1's site goes to production, links stop to work because now the structure looks like www.client1site.com/en/a-nice-article.

The situation is general, in the sense that you can develop under a path /X/ and have to go to production under a path /Y/.

Can this be solved with an easy way without having to edit all content or image srcs by hand? Can some mod_rewrite wizardry save the day?
Frankly, I have never suffered from any path reference issue that you are describing, speaking of managed files.
As per unmanaged files, which laying around on the ftp server, that you may happen to refer to in raw code or WYSIWYG editors, make sure you don't use absolute paths starting with domain name. Check your WYSIWYG editor settings. Instead, you'd want to:


use links starting with slash - I call them root links
edit the settings.php file and provide an explicit URL of your current site root in the $base_url variable. This is what the root links will refer to as base. Thus, when you move your site to another domain, it should require just changing of that one value.


I'm not sure there is a tool to do global replacements of absolute path you might already have. You could however dig into database and do a global search on it.