admin管理员组

文章数量:1287991

Lets say my Wordpress site is , and when I visit it, I keep getting 301 redirected to . This happens only with /, all other pages are working.

I have tried to eliminate the usual suspects:

  • Plugins: disabled all, didn't help
  • Theme: switched to the default one, didn't help
  • HTTPs: no, because /contact-us, /wp-admin/ and everything else works with HTTPs and the certificate is valid
  • www: no, the domain does not have a www prefix, the redirect has the 'naked' domain
  • .htaccess: renamed to something else to disable it, didn't help
  • The static page itself: works when assigned a slug and visited directly, e.g. /home; assigning an otherwise working page to be the Front Page doesn't help either
  • SettingsReadingYour homepage displays:
    • A static page having a selected front page:
      • navigating to / 301 redirects back to / in a loop ← this is the whole problem
      • navigating to /index.php actually displays the selected front page
    • When selecting Your latest posts:
      • navigating to / works, lists the latest posts
      • navigating to /index.php redirects to /

Lastly, this website is a duplicate copy of another website that works fine. I have changed wp-config.php to connect to a different database, as well as the wp_options table to have example as a siteurl and home.

本文标签: Thelocation 301redirects to itself in a loop