Hi,
Thanks for your response.
It turns out that there are two blocks of code in the .htaccess: the Wordfence WAF that you refer to, and the following:
# 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]
</IfModule>
I could swear that I had no .htaccess file at all before installing Wordfence, but I may be wrong. In any case, commenting out those lines fixed my problem. I’m not sure where those lines came from or even what they are trying to do.
In any case, my problem is now solved.
Thanks again for your help,
Steve