1. get rid of the 301 and leading slash
2. replace it with a ^ which is a start anchor
3. get rid of the ? in the character group
4. escape the literal period with a backslash
5. add a $ to the end of the pattern which is an end anchor
6. add a ? after the substitution string so the query string doesn't pass through to the redirected url.