WordPress suddenly changed url addressing style from 'abc.net/home/… to abc.net/home-3/

你。 提交于 2020-03-05 06:05:26

问题


Please help with the issue on my WordPress site (I`ve Googled for nothing.

My site has url structure "egf.ru/home/...", but suddenly all links become "egf.ru/home-3/.."

It looks like the site decided to move permanently on his own will.

I`m new to WordPress and failed to find out how to bring it back and what was the reason for that.

The main trouble of this - SEO . Because now all previously valid indexed (egf.ru/home/... ) links become 404.

And the next problem is that some articles still has inside of their text - links addressing to original egf.ru/home/.. - clicking them brings us to 404.

And of course, if I would change that address manually in my browser from ../home/.. to ../home-3/.., it would immediately works perfect.

So made a simple temporary "patch" of 302 redirect at header.php

php pseudo

if (('home/') inside $url) 
{
    str_replace('..home..','..home-3..') 
    header(Location: ..home-3..)
    die:)
}

to make all links valid.

But this does not solve the problem globally.

Please help me to bring it back to original route mode (../home/..). not as home-3.

Ugh.

Active plugins (40pcs) are:

CAOS AMP SEO ALL-IN-ONE .......DUPLICATE POST.... Wp OPTIMIZE

duplicate post... but how is it possible that someone has duplicated everything twice? Moreover original url of files with path 'egf.ru/home/.../filename' do not exists As well as 'egf.ru/home-2/.../filename' .

So WHAT could someone duplicate to make such a mess =(


回答1:


FINAL!))

SOmeone has duplicated the page set as main with nickname 'home' and send it to the drafts.

So the oxygen template moved its base to the most fresh copy of mainpagehome - /home-3/

but all meny still was hooked at that drafted page /home/ which nevertheless was drafted still was the root origin for all menu..

SO

we undrafted an old original /home/ page and put it back as main for template.

In such a way the syncronyzations between manu and template navigation and old manual links (egf.ru/home/abcxyz) became valid and the site was restored.

During that time I`ve used a 302 temporary redirect from home to home/3 to avoid 404 doesnt exist response

And after all When GOOGle has partially indexed home-3 instead of home when everything was cured - I made 301 permanently redirected from /home-3/ to /home/ to unite twigging back =)

Be careful with modifying status of the page which is root parent for menu. I don`t know where to change it, so I rolledback to the old original home page (or renamed castlingly... I dont remember) but wordpress felt down with no words of warnings )) So somebody unknowingly has drafted a basis-for-menu page. And noone ofter understood what has happened and what&where to cure



来源:https://stackoverflow.com/questions/60022815/wordpress-suddenly-changed-url-addressing-style-from-abc-net-home-to-abc-ne

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