wildcard redirect while avoiding redirect loop in wordpress

I’ve been having a difficult time modifying my HTACCESS file so that I may have the redirect as stated below:

RedirectMatch ^/(.*)$ /?houseno=$1

This redirect is currently functional and will direct an example URL of

Read More

www.example.com/212main to www.example.com/?houseno=212main

However, I experience a redirect loop since this is on a wordpress website and I’m having a difficult time determining the work-around for this.

The rest of my HTACCESS file in it’s entirety is as follows:

# BEGIN WordPress
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RedirectMatch ^/(.*)$ /?houseno=$1

</IfModule>
# END WordPress

I have a feeling that it’s a very minor change that would prevent the redirect loop. Please help. Thanks in advance!

Related posts