Support » Fixing WordPress » WP in Root, subdirectories give 500 Error.

  • I recently had some trouble on a new GoDaddy server and wanted to share my How To, in case anyone had the same/similar problem. I now know why WordPress should always be installed into subdirectories.

    I have a primary domain hosted, and other secondary domains pointed to subdirectories there. For instance:

    [] is my main site, and [] points to a subfolder in the directory where the [] files are stored.

    I installed WordPress in the root of [].

    If I directly accesed any files at [] the correct page would come up, but if I attempted to access files that did not exist (what should give me a 404 error) I received a 500 Server error. This turned out to be problem with the way mod_rewrite was doing it’s thing from the root directory.

    Because accessing [] was the same as typing []… the rewrite engine would kick in to fix up the URL, since the file wasn’t found (on purpose) but didn’t have a redirect set up.

    To fix this, instead of reinstalling WordPress in a subdirectory, I added the following line to the TOP of my ‘.htaccess’ file:

    RewriteRule ^( – [L]

    Where ‘’ was the name of the subdirectory that files for that domain were stored.

    There might be a better way to do this, but that’s how I got it working.

    I hope I explained this in at least a slightly understandable way.


Viewing 1 replies (of 1 total)
  • Hi, I’m facing a somewhat similar problem. My blog used to be in and I moved it to the root, so that my blog address is now Right now, I’m facing some problems with my search engine results, as I want outdated entries to error 404, instead of error 500 (e.g., should 404, but it currently returns a 500). I need it to 404 so that Google will update its index.

    Now, there’s a .htaccess in the root and it has the standard WordPress entries in it:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Should I edit the existing RewriteRule line? I tried adding the line you mentioned to the top of the file, but it still returns a 500.


Viewing 1 replies (of 1 total)
  • The topic ‘WP in Root, subdirectories give 500 Error.’ is closed to new replies.