D
D
Denis2014-02-15 19:36:25
linux
Denis, 2014-02-15 19:36:25

Wordpress: how to implement a circular redirect after a domain change?

Hello! There was a site on WP. Sawed at olddomain.com/test/wordpress and everything was fine. CNC were, if that matters.
After moving to newdomain.com/wordpress, I corrected the site address in the admin panel and manually corrected .htacces
Was:
# BEGIN WordPress
RewriteEngine On
RewriteBase /test/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /test/wordpress/index.php [L]
# END WordPress
Became:
# BEGIN WordPress
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
# END WordPress
Home and admin are available. Pictures are displayed. I get a 500 error every time I go to any page.
Apache logs: [Sat Feb 15 17:31:39 2014] [error] [client 127.0.0.1] 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., referer : newdomain.ru/wordpress PS Taking this opportunity: do I understand correctly that the VI uses an internal mechanism for rewriting links and moving to pure nginx (without Apache) will be painless - you only need to transfer 5 lines from .htacces?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander Zelenin, 2014-02-15
@zelenin

a painless move looks like this:
1. in the dump, do search & replace olddomain.com/test/wordpress => newdomain.com/wordpress (siteurl and home are not enough)
2. fix htaccess (or update the link rules from the admin)

R
Ruslan, 2014-02-15
@rOOse

Try temporarily disabling permalinks, and if you have access to mysql, look there in the wp_options table for two entries with the site address, siteurl and home, both should be equal to the current site address.

S
Sergei Borisov, 2014-02-16
@risik

editing wp_options is not enough. Upvoting @zelenin 's answer . Here is a detailed article: dimox.name/moving-the-site-on-new-domain google rurit

V
Vladimir Petrozavodsky, 2018-04-04
@vovasik

To implement and not eliminate?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question