Fix breaking rewrite rules starting with ^.
Merge branch 'fix-prefix-rewrite-rules' into my-version