Reroute old content (.html/.php etc.) to Ruby on Rails

前端 未结 3 1148
没有蜡笔的小新
没有蜡笔的小新 2021-01-14 04:31

I have switched to Ruby on Rails and my current problem is to reroute the old contents like XXX/dummy.html or XXX/dummy.php in RoR.

What ex

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-14 05:27

    What do you mean by migrating? I recommend to redirect clients to use the RoR URLs. This can be done using HTTP 301 status codes. See http://en.wikipedia.org/wiki/HTTP_301:

    The HTTP response status code 301 Moved Permanently is used for permanent redirection.

    This can be done in the configuration of your HTTP server.

提交回复
热议问题