Du solltest um es Suchmaschinen zu erleichtern ohnehin nur eine Variante verwenden, dafür reichen zwei Zeilen in der .htaccess
Variante 1: Nur ohne www
Apache Configuration
RewriteCond %[COLOR=#006600][B]{[/B][/COLOR]HTTP_HOST[COLOR=#006600][B]}[/B][/COLOR] ^www\.[COLOR=#006600][B]([/B][/COLOR][COLOR=#006600][B][[/B][/COLOR]^\.[COLOR=#006600][B]][/B][/COLOR]+\.[COLOR=#006600][B][[/B][/COLOR]^\.[COLOR=#006600][B]][/B][/COLOR]+[COLOR=#006600][B])[/B][/COLOR]$ [COLOR=#006600][B][[/B][/COLOR]NC[COLOR=#006600][B]][/B][/COLOR]
RewriteRule ^[COLOR=#006600][B]([/B][/COLOR].*[COLOR=#006600][B])[/B][/COLOR]$ http:[COLOR=#ff9933][I]//%1/$1 [R=301,L] [/I][/COLOR]
Variante 2 sollte dann genau anders herum sein:
Apache Configuration
RewriteCond %[COLOR=#006600][B]{[/B][/COLOR]HTTP_HOST[COLOR=#006600][B]}[/B][/COLOR] !^www\.[COLOR=#006600][B]([/B][/COLOR][COLOR=#006600][B][[/B][/COLOR]^\.[COLOR=#006600][B]][/B][/COLOR]+\.[COLOR=#006600][B][[/B][/COLOR]^\.[COLOR=#006600][B]][/B][/COLOR]+[COLOR=#006600][B])[/B][/COLOR]$ [COLOR=#006600][B][[/B][/COLOR]NC[COLOR=#006600][B]][/B][/COLOR]
RewriteRule ^[COLOR=#006600][B]([/B][/COLOR].*[COLOR=#006600][B])[/B][/COLOR]$ http:[COLOR=#ff9933][I]//www\.%1/$1 [R=301,L] [/I][/COLOR]
bzw. länger formuliert: