Cloned site in subdirectory keeps redirecting to root
-
I used the Duplicator plugin to make a copy of my main https://l4jp.com site in a subdirectory “old” so I could do comparisons between versions of a theme and fix CSS problems. I can access the main landing URL https://l4jp.com/old, but any other frontend URL associated with that site (whether from navigation on the site or input directly in the browser) gets a 301 redirect to the main site (i.e. the “old/” in the middle of the URL is removed). I’ve checked wp-config.php and .htaccess for oddities, but I didn’t spot anything obvious.
There are two pieces of evidence that it’s WordPress doing the redirect: (1)
https://l4jp.com/old/wp-admin/
does not redirect – the problem is only the frontend; (2) when I rancurl -v https://l4jp.com/old/about-en/
a month ago when first fighting this, it reported the following:> GET /old/about-en/ HTTP/1.1 > User-Agent: curl/7.29.0 > Host: l4jp.com > Accept: */* > < HTTP/1.1 301 Moved Permanently < Server: nginx < Date: Fri, 27 Oct 2023 06:17:05 GMT < Content-Type: text/html; charset=UTF-8 < Transfer-Encoding: chunked < Connection: keep-alive < Expires: Wed, 11 Jan 1984 05:00:00 GMT < Cache-Control: no-cache, must-revalidate, max-age=0 < X-Redirect-By: WordPress < Location: https://l4jp.com/about-en/
I don’t know what some of that means (including what expires in 1984!), but
X-Redirect-By: WordPress
seems pretty clear. Mysteriously, after a month with no action on my part, I don’t get exactly the same curl output now (confusing answers instead), but I assume WordPress is still involved. Suggestions on what to look for?The page I need help with: [log in to see the link]
- The topic ‘Cloned site in subdirectory keeps redirecting to root’ is closed to new replies.