The 500 error is typically because of a syntax error. If it went away when you removed the first line, the first line was using an improper format.
If you mean to match the dot character in your {HTTP_HOST} or {REQUEST_URI} (RewriteRule) variables, then you should use \. (unless it’s within a character range definition).
Your No Case flags are good in your RewriteCond statements but are improper in a RewriteRule (because directory and filenames are case sensitive while host names are not).
Your test URI (as shown) makes the second atom created null so your index.php’s value for $_GET[‘topic’] will also be null. If that makes the output of your page null, also, what is the surprise? Okay, it’s more likely that you’ve not accounted for the null value so it’s more likely that you’re getting an error from your database query which is causing the index.php script to fail.