I have a hosted website which includes a secure regiatration and purchase section which provides access to paid content. The SSL certificate validation will fail if the url is not in the form www.domainname.com. I was looking at using mod_rewrite rules to redirect if www was not found in the url. This works but then the redirect to the secure pages fails with a 500 error. Checking the ssl_error logs I see:
[Wed Jul 29 21:20:32 2009] [alert] [client xx.xx.xx.xx] /vservers/domainname/htdocs/.htaccess: RewriteEngine not allowed here, referer: http://www.domainname.com/index.php?option=com_content&view=category&id=2&Item=9
.htaccess we tried:
# mod_rewrite in use
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domainname.com [NC]
RewriteRule ^(.*) http://www.domain.com/$1 [L,R=301]
I'm not sure if this is something I can fix or must I wait for the hosting provider to get around to the problem.