Hey, well I'm trying to redirect a wildcard subdomain, *.belginfish.com to http://www.belginfish.com For some reason, when i add the redirection through cpanel its giving me this error: Apache detected an error in the Rewrite config. Syntax error on line 17 of .htaccess.hbsja7z_zfF8mKXFKyNohohIURgEhBs3: RewriteCond: cannot compile regular expression '^*.belginfish.com$' Please try again. Could anyone tell me why i would be getting this? My host allows wildcard domains, Thanks
Add the following lines to your .htaccess file: RewriteCond %{HTTP_HOST} . RewriteCond %{HTTP_HOST} !^www\.belginfish\.com RewriteRule (.*) http://www.belginfish.com/$1 [R=301,L]