I recently noticed some incoming 404 error hits from URLs with their hashtag escaped.
Correct URL structure:
http://example.org/#!/thepage
or /index.html#!/thepage
Escaped/ Incorrect URL:
http://example.org/%23!/thepage
I tried the following .htaccess rule with little success:
RewriteEngine on
RewriteRule ^%23!/(.*)$ /index.html#!/$1 [NE]
Thanks to this answer which pointed me into the right direction: https://webmasters.stackexchange.com/a/76059
Here is the rule that worked for me
When using
\x
it will match escaped characters starting with%