How to undo a 301 redirect?

百般思念 提交于 2019-12-19 06:26:08

问题


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 a 301 redirect back to the original url", at least thats what I thought was the solution, until I saw people mentioning that you can't do a 301 redirect back http://getluky.net/2010/12/14/301-redirects-cannot-be-undon/ http://www.velocityreviews.com/forums/t500058-undo-301-redirect.html

this was a surprise and I don't know for sure if it's true, so what I'm asking is, what would be the proper way to revert a cached permanent 301 redirect from page /a.html to page /b.html back to the original /a.html ?

I would like some experts opinions.


回答1:


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




回答2:


If your problematic redirect is only on HTTP, Change to HTTPS. Or change example.com to www.example.com, or the other way around.



来源:https://stackoverflow.com/questions/10136895/how-to-undo-a-301-redirect

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