Support » Fixing WordPress » WordPress .htaccess cause 500 error on 404 outside of WP

  • Hi,

    I’m not sure if I’ve found a bug or am just doing something wrong. It seems that using WordPress permalinks is causing a problem on any url outside of the WordPress directory.

    For example, I have WP at and a subdomain at well if I use the default .htacess everything works fine inside of WordPress but seems to cause a loop during a 404 search outside of WordPress.

    I think the problem is that the line RewriteRule ^index\.php$ - [L] is trying to find index.php in the subdomain folder and is failing so it’s getting grumpy and throwing a 500 error. If I comment out this line the 404 error works but (obviously) not WordPress permalinks.

    Not sure if there is an easy fix and I’m just missing something here.
    Here is the complete .htaccess

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

Viewing 1 replies (of 1 total)
  • Looks like one solution is to just turn off RewriteEngine for the subdomain

    <IfModule mod_rewrite.c>
    RewriteEngine off

    I’m hoping there may be a better solution though. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress .htaccess cause 500 error on 404 outside of WP’ is closed to new replies.