简体   繁体   中英

why doesn't the browser redirect when using a status of 410 in rails?

Some of my products have been removed from my store.

I thought it was natural to do this for all of these products that might still get traffic from search engine links:

redirect_to :root, :status => 410

Curiously, rails seems to send back a You are being redirected body, instead of an actual redirect.

However

redirect_to :root

Works as expected...

410 is client error response (resource gone), not a redirect response.

Only 3xx status codes are redirects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM