I have this in my root htaccess file to send all non www requests to www.
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
It works fine on all subdirectories except the cgi-bin and its subdirectories. What am I missing? Do I need a second htaccess in the cgi-bin to control that? I'm kind of baffled. I do have a subdirectory in the cgi-bin with its own htaccess file that works for what it's supposed to, but I'm not sure what I need to do here to make this work. Any input would be greatly appreciated.