Problems with .htaccess rewrite and Ruby on Rails/Redmine

It might seem obvious but double check for typos. If the RewriteCond and the RewriteRule don't have exactly the same string for the host then you will end up with infinite redirects. Since you have used placeholders here we can't spot that problem for you.

It's worth using 302 redirects while you are debugging. 301s are cachable and normal web browsers will continue using a 301 redirect they received long after you have changed it on the server. Command line tools like curl and wget don't do this sort of caching.

Do you have a reverse proxy? If so, the Host: header may not be the same on the back end as at the front end.

A timeout is not the same as a 500 error. A redirect loop is not the same as either of them. Try to track down exactly what the response is. Using something like curl -s --include http://www.domain.tdl/ | grep "^HTTP" should do the trick.