I tried out several redirects but none worked for my needs. Could you please help me to figure out this one? I know, it has been answered many times but I can not get it to work. Thanks.

I need to redirect [from](http://example.com/demo/details?acronym=some-string) [to](http://example.com/demo/some-string) 

Examples:

```
 /demo/details?acronym=text15

```

to

```
 /demo/text15

```

or

```
 /demo/details?acronym=text-c15

```

to

```
 /demo/text-c15

```

The correct redirect was:

```
#redirect from  "demo/details\?acronym=some-string" to "/demo/some-string"
RewriteCond %{THE_REQUEST} /details\?acronym=([^\s]+) [NC]
RewriteRule ^ /demo/%1? [NC,L,R]

```