.htaccess for WordPress multi-site causing random error 500?
I have a fresh WordPress 3.2 site and have activated multi-site for it. I am hosting this on a shared CPanel account and the WordPress install is in the root /public_html folder. I have it set for wildcard subdomain blogs.
The problem is that I have been getting a lot of random Internal Error 500's (every 10 minutes), so my host said that it is because of .htaccess. So they deleted .htaccess and now my site no longer gets the error 500's.
Why could this be happening? Any ideas on what the problem could be and how to fix it? Any help or advise is greatly appreciated.
Below are the only logs I have from CPanel. Just a bunch of file not found errors, which I can't understand why this would cause it. It sounds a lot like this but no resolution was determined there: http://wordpress.org/support/topic/multisite-default-htaccess-rules-cause-infinite-loop-1
[Mon Oct 03 12:34:22 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml, referer: http://user234tech.com/wp-admin/network/plugins.php?deactivate=true&plugin_status=all&paged=1&s=
[Mon Oct 03 12:34:22 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/3dc97e86a78d6d3786305e7ff8d89180.css, referer: http://user234tech.com/wp-admin/network/plugins.php?deactivate=true&plugin_status=all&paged=1&s=
[Mon Oct 03 12:34:19 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:34:19 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/3dc97e86a78d6d3786305e7ff8d89180.css, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:34:19 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:34:19 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/3dc97e86a78d6d3786305e7ff8d89180.css, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:34:18 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:34:18 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/3dc97e86a78d6d3786305e7ff8d89180.css, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:34:18 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:34:18 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/3dc97e86a78d6d3786305e7ff8d89180.css, referer: http://subdomain1.user234tech.com/wp-admin/plugins.php
[Mon Oct 03 12:12:19 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/500.shtml, referer: http://user234.co/wp-admin/network/index.php
[Mon Oct 03 12:09:37 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml, referer: http://user234.co/wp-admin/network/index.php
[Mon Oct 03 12:09:37 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/dd406ba6ef3849450071a811b5b94568.css, referer: http://user234.co/wp-admin/network/index.php
[Mon Oct 03 11:55:08 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml
[Mon Oct 03 11:55:08 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/phpinfo.php,
[Mon Oct 03 11:54:21 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml
[Mon Oct 03 11:54:21 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/favicon.ico
[Mon Oct 03 11:54:21 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml
[Mon Oct 03 11:54:21 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/favicon.ico
[Mon Oct 03 11:54:21 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/404.shtml
[Mon Oct 03 11:54:21 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/favicon.ico
[Mon Oct 03 11:51:26 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/500.shtml
[Mon Oct 03 11:50:56 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/500.shtml
[Mon Oct 03 11:50:54 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_html/500.shtml
[Mon Oct 03 11:47:45 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_sites/somedomain3.com/404.shtml
[Mon Oct 03 11:47:45 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_sites/somedomain3.com/favicon.ico
[Mon Oct 03 11:47:45 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_sites/somedomain3.com/500.shtml
[Mon Oct 03 11:47:42 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_sites/billing.user234tech.com/404.shtml
[Mon Oct 03 11:47:42 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_sites/billing.user234tech.com/favicon.ico
[Mon Oct 03 11:47:42 2011] [error] [client xx.xx.xx.xx] File does not exist: /home/user234/public_sites/billing.user234tech.com/500.shtml
Here is my .htaccess by the way:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
R开发者_运维技巧ewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
# END WordPress
I just ran into this myself...and, luckily, after hours... just found the answer.
The problem was that I manually added a 2nd domain name as a ServerAlias in my httpd.conf file. HOWEVER, that 2nd domain was not setup as a parked domain via the control panel.
My fix...
STEP 1: Remove (comment) the ServerAlias lines in the httpd.conf file that referenced my secondary (alias) domain. Restart httpd.
STEP 2: Go to my primary domain name in cPanel and ADD PARKED DOMAIN. This sets up my secondary domain in a subdirectory of the website. (If you don't do step 1 you will get an error message).
STEP 3: Go back and manually edit the httpd.conf file and comment out the cPanel generated block for the secondary domain. I don't want it going to a subdirectory, I want it going to the same exact place as the primary domain. This is just an alias for the primary domain after all.
STEP 4: While I'm in there, take out those 2 comment lines I added before so that my ServerAlias is back in place for my secondary domain.
STEP 5: Restart httpd.
Now my secondary domain name is registered in cPanel and all the supporting data & system files to allow Apache to serve up my WordPress site properly regardless of if I go to the "charlestonvolleyball.net" or "charlestonvolleyball.com" domain.
If you are not having an issue with this being a secondary domain name, go back and make sure all your cPanel settings are correct. You will need to make sure the domain your are trying to serve your Wordpress pages from is registered in cPanel or WHM. In WHM it will be on your "list of accounts", assuming you are an IPP or run your own dedicated server.
The domain can also be in cPanel for any of the domains hosted on the server and can be either the primary domain name (the main account URL) OR a parked domain. Subdomain has no bearing here, it is simply a host within a parked or primary domain.
HTH. Adding the parked domain and temporarily disabling my manual hacks to HTTPD worked for me.
Good luck.
精彩评论