0

I have recently updated my WordPress to 5.5 and I encountered "too many redirection error" when I use URL with page id /?p=1234 (previously it was working before the update). It keeps redirecting to /1 regardless of post id number

I am using multisite and in my permalink settings I am using /%postname%/

Checking redirection I get this:

?p=1234
301 Moved Permanently
1
301 Moved Permanently
1
301 Moved Permanently
1

My .htaccess:

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
#add a trailing slash
RewriteEngine On
RewriteCond %{REQUEST_URI} /+[^\.]+$ 
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php/$1 [L,QSA]
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
#add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
</IfModule>
# END WordPress

Any help on how to further check or solve this?

1
  • There's nothing in the .htaccess file you posted that would trigger this.
    – MrWhite
    Aug 26 '20 at 17:54
1

In case someone looking for answers in the future, I have solved the issue by searching for

add_filter('redirect_canonical'

in all the plugins and found the culprit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.