# 301 instead of 302 on redirect\_to - RESTful

**URL:** <https://www.ruby-forum.com/t/301-instead-of-302-on-redirect-to-restful/85694>\
**Category:** Rails\
**Created:** [February 15, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/301-instead-of-302-on-redirect-to-restful/85694 "2007-02-15T16:35:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattias](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/cab0a1/32.png) [@mattias](https://www.ruby-forum.com/u/mattias)\
**Post date:** [February 15, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/301-instead-of-302-on-redirect-to-restful/85694/1 "2007-02-15T16:35:57Z")

</div>

All this works on my dev machine (mongrel\_rails) which makes it hard to  
debug. The deploy machine runs lighttpd 1.4.13 and rails 1.2.2.

This is how it lookes:

POST model/1 (\_method PUT)  
180.160.211.126 host.dk - [15/Feb/2007:16:05:53 +0100] “POST /model/6  
HTTP/1.1” 301 0 “[http://host.dk/model/6;edit?](http://host.dk/model/6;edit?)” “Mozilla/5.0 (Macintosh;  
U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204  
Firefox/2.0.0.1”

As you can see it returns 301 and not 302 which it should and does on  
the dev machine. It never gets to the controller.

Any idears?

/mattias
