AH00124: Request exceeded the limit of 10 internal redirects due to probable

偶尔善良 提交于 2019-12-13 16:07:36

问题


After the upgrade of my Ubuntu server, I tried open my wordpress website and I got this error in my error.log

AH00124: 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.

message a get when i open the website.

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

I tried these 2 links bellow but my .htaccess is diferent so did not work.

Apache 2.4 - Request exceeded the limit of 10 internal redirects due to probable configuration error

Request exceeded the limit of 10 internal redirects due to probable configuration error.?

.htaccess /root

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

.htaccess /blog

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

# END WordPres

apache:

Server version: Apache/2.4.18 (Ubuntu)

someone know how to solve this?

thank you.


回答1:


Try to increase the limit however I guess its a loop. The following article should lead you into the correct direction:

https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Try with two different .htaccess. In the root folder:

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

# END WordPress

... or just make sure you redirect to the subfolder.

In subfolder:

# 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

Check your permalink settings home_url and blog_url. This may also cause an endless loop. Update your permalinks and search wp_options in order to insert the correct url / domain for your blog.

It also may be an Ubuntu specific configuration error try to raise limits or check for missing libraries like mod_rewrite.




回答2:


was no php module for apache, and apache was interpreting php as a text.

to solve this i did:

apt-get install libapache2-mod-php

/etc/init.d/apache2 restart

apt-get install php7.0-mysql 

/etc/init.d/apache2 restart


来源:https://stackoverflow.com/questions/41701853/ah00124-request-exceeded-the-limit-of-10-internal-redirects-due-to-probable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!