subdomain error

500 errors with subdomain wpress installation

Junior Member

Hi - I have many 500 errors when the URLs show a specific file - EG, subdomain.example.com/folder/file.php, but not with the bare URL, EG, subdomain.example.com/

Example.com/subdomain/folder/file.php also resolves OK.

I have tried rewriting the URL from subdomain.example.com to example.com/subdomain/ ie, Options +FollowSymlinks RewriteEngine On RewriteCond %{http_host} ^subdomain.example.comt(.*) [NC] RewriteRule ^(.*)$ http://example.com/subdomain/$1 [R=301,L] I have downloaded/tried various other forms of subdomain redirect unsuccessfully too. Any ideas please?

Here the new RewriteCond prevents the rule from being re-invoked if the requested path already starts with "subdomain/" and so prevents recursion (looping).

Note: When you get a 500-Server Error, the first place to look is in your server error log file. The information in that file often indicates the exact problem, or at least gives a strong clue... In this case, you will find "Request exceeded the limit of <number> redirects due to probable configuration error." or some-such, pointing you to an error in your configurations files -- e.g. .htaccess code.

Junior Member

Senior Member

joined:Mar 31, 2002
posts:25430
votes: 0

I'm not sure, because I don't use cPanel-type hosting. I just look at my raw server access and error log files.

Also, be aware that in that type of set-up, it's common for the host to flush the error the log file, usually on a daily basis. So you might have to re-create the errors to see a 'fresh' error log entry.