To consolidate the non-www and www versions of my site, I've added the following to htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301]
This is now causing problems with Matt Wright's Formmail program that I use.

Formmail is generating this error message:
The form attempting to use FormMail resides at, which is not allowed to access this cgi script.
If you are attempting to configure FormMail to run with this form, you need to add the following to @referers, explained in detail in the README file.

Add '' to your @referers array.
However, the domain name is already in the @referrers array.

@referers = ('','');

Can anybody suggest what the problem might be and the solution?

Thanks in advance