Skip to main content

You are here

301 URL redirect on Ruby on Rails

In your respective controller, specify the method of the view in questioned that needs to be redirected.

def code
   headers["Status"] = "301 Moved Permanently"
   redirect_to "https://www.example.com/alpha01"
 end
Premium Drupal Themes by Adaptivethemes