I'm currently using htaccess to force all requests to use www. So:
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
to redirect example.com/page to www.example.com/page.
However, this htaccess file is being used by several international versions of example.com. What code do I want that can also do the following:
example.de/page -> www.example.de/page and example.co.uk/page -> www.example.co.uk/page etc.
Potentially, there could be dozens of versions of example.com, so I'm looking to avoid having to remember to edit htaccess every time we add a new country.