For starters: Are you aiming for a rewrite or a redirect? Your rule as written is a half-hearted redirect: [R=301] flag, but target doesn't include explicit protocol-plus domain.
(wcts.*)
Surprisingly, this is
almost what you want. (The "wcts" seemed so improbable, I assumed you meant [wcts] until I poked into those auto-linked URLs.) I say "almost" because mod_rewrite alone doesn't see the query string, only the path.
Second issue: What if the question contains more than one literal space? You can make RewriteRules to cover, separately, a limited number of possible spaces. But if you venture into tail-that-wags-the-query territory, htaccess is not what you want to do. Don't rely on the [N] flag. In fact it's potentially disastrous because [N] doesn't mean "keep running this same rule until it rinses clean". It means "go
all the way back to the first RewriteRule and start over".
You need two things. The pattern itself should give the name of the page, minus query:
RewriteRule ^dev/?$
Note that the ? here means "optional". Nothing to do with the query string. It's in case the final directory-slash got lost.
Then there will be a condition in the form
RewriteCond %{QUERY_STRING} (?:^|&)wcts=([^&+]+)\+([^&+]+)(?:$|&)
If you want to make versions of the rule for queries with two or three literal spaces, create a separate rule-with-condition set for each. More than three spaces and you really shouldn't be doing it in htaccess.
Is the "wcts" part always the first thing in the query? The combination of recycling part of the query while changing another part will be much more painless if you've ensured that the pieces of the query string always come in the same order.
But before we go any further... the URL turns the spaces into +
What
exactly do you mean by this? That is, I understand that literal spaces are being turned into literal plus signs. But at what stage does this happen? Normally you don't see it until the query is sent out into the internet-- the same point where spaces in the path turn into %20. Here it seems as if the query ought to get intercepted before it can leave your site. If it wasn't supposed to go anywhere, the problem may be something different entirely.