How to undo a 301 redirect?

前端 未结 2 1066
野趣味
野趣味 2021-01-12 09:50

Now, I don\'t have any problems with 301 redirects, but one person asked me for the way to undo cached 301 redirects for browsers and search engines, so I replied \"by doing

2条回答
  •  清歌不尽
    2021-01-12 09:58

    Don't use 301 if the stuff hasn't moved permanently (forever!). This would be the proper solution.

    The problem is that caching is done on the client side so you need to wait for that cache to timeout, then the client will again get the original page.

    As far as I know this cannot be done in your situation from the server side.

    As a workaround you could create a synonym for a.html (on your server, like ln -s a_foo.html a.html) and redirect from b.html to a_foo.html

提交回复
热议问题