default wordpress htaccess causing redirect loop

I have default wordpress htaccess on my wordpress sites.

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*.php)$ wp/$1 [L]
RewriteRule . index.php [L]

I’m using cpanel on server and wordpress is installed in /home/username/public_html
For some reason when I access some site on the website that does not exists I get internal server error instead of 404.

Read More

Also in log I get this error

 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

And after some time I start to get this error

mod_fcgid: can't apply process slot for /usr/local/cpanel/cgi-sys/php5

which in the end disables my webpage with message about not enough resources.

I’m using whm/cpanel with apache. Anyone knows how to fix this ?

Related posts

Leave a Reply

1 comment

  1. Based off of the path you provided for your install directory, I’m going to assume you are using the default setup at www.yousite.com.
    The problem looks like you are using the htaccess rules for a wordpress site installed on a subdomain and not the default rules.

    You should try and use the default wordpress rules below instead.

    # 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]
    </IfModule>
    # END WordPress
    

    You can see here the different htaccess configurations to use for certain types of WP installs.
    http://codex.wordpress.org/htaccess

    WordPress has a lot of internal stuff that works with htaccess so I would try and use the recommended htaccess configs.