I know 301 redirects are possible via PHP, but I've never tried it. So I can't say if your method is correct or not. 
The important thing is that you implement a method that forces all users to the same base URL. This will eliminate your csshover.htc error with Internet Explorer.
The best way to handle the redirects is to add something like the following to the httpd.conf (apache). Most likely you would need to ask your host to do this. The following will redirect users who type "domain.com" to "www.domain.com" Using multiple domain names, you will have to make modifications to account for the different cases.
xxx.xxx.xxx.xxx would be replaced by your domain's IP address. (:80) is port 80 (non-ssl), for your https, you would need the same with (:443).
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^xxx.xxx.xxx.xxx(:80)?$
RewriteCond %{HTTP_HOST} !^www.domain.com(:80)?$
RewriteRule ^/(.*) http://www.domain.com/$1 [L,R=301]
OR, you can modify/add to a .htaccess file
Code:
########## added 301 redirect
#
RewriteCond %{HTTP_HOST} !^www\.thecompanykw\.com [NC]
RewriteRule ^(.*)$ http://www.thecompanykw.com/$1 [L,R=301]
#
########## end 301 redirect
There are many-many ways to accomplish and configure 301 redirects. I recommend you talk with your host to see if they can assist you.