I have migrated to a new server and when ever I try to use my site with the www prefix I get a 500 internal server error. This use to work on my previous host just fine. Here is a snippet of the htaccess file which refers to the www - no where else does it refer to the www.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^blog/ - [L]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1
RewriteRule ^search/(.*)/(.*)/(.*)/(.*) /search.php?searchfor=$1&sortby=$2&page=$3&searchterm=$4
RewriteRule ^confirmemail/(.*) /confirmemail.php?code=$1
RewriteRule ^resetpassword/(.*) /resetpassword.php?code=$1
RewriteRule ^resendconfirmation/(.*) /resendconfirmation.php?userid=$1
RewriteRule ^categories/ /categories.php
RewriteRule ^([-_~*a-zA-Z0-9]+)(\/)?$ /memberprofile.php?username=$1
RewriteRule ^browse/audios/(.*)/(.*)/(.*)/(.*) /audios.php?sortby=$1&filter=$2&page=$3&title=$4
RewriteRule ^browse/categories/audios/(.*)/(.*)/(.*)/(.*) /categoryaudios.php?sortby=$1&filter=$2&page=$3&title=$4
RewriteRule ^audios/(.*)/(.*) /playaudio.php?audioid=$1&title=$2
RewriteRule ^download/audio/(.*)/(.*) /downloadaudio.php?AUDIOID=$1&title=$2
RewriteRule ^members/audios/(.*)/(.*) /memberaudios.php?pid=$1&username=$2
RewriteRule ^syndicate/audios/(.*)/(.*) /syndicateaudios.php?filter=$1&title=$2
</IfModule>
What else can I check?
I have setup this domain up with Plesk Control Panel - maybe this is the issue?
Thanks all for any help
Update
The error logs show this when i go to my site using the www prefix.
[Wed Sep 08 13:57:24 2010] [error] [client xx.xxx.xx.xxx] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Update 2
My site has a server alias in the httpd.conf file of the form serverAlias www.mydomain.com - can this cause redirect loop?
Update 3
I was not able to get apache to create or write to the rewrite log and I don't want to do too many service restarts since there are people using the site.
I have added a bounty to this question as I really need help!
ErrorLogfor the domain. – joschi Sep 8 '10 at 11:51RewriteLogandRewriteLogLevelto see which redirections occur on your rewrite rules. – joschi Sep 8 '10 at 12:25