# Static url rewriting / response headers

**URL:** <https://www.ruby-forum.com/t/static-url-rewriting-response-headers/73060>\
**Category:** Rails\
**Created:** [October 20, 2006, 11:01pm UTC](https://www.ruby-forum.com/t/static-url-rewriting-response-headers/73060 "2006-10-20T23:01:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian.estlin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7bcc69/32.png) [@brian.estlin](https://www.ruby-forum.com/u/brian.estlin)\
**Post date:** [October 20, 2006, 11:01pm UTC](https://www.ruby-forum.com/t/static-url-rewriting-response-headers/73060/1 "2006-10-20T23:01:36Z")

</div>

hi all,

two questions:

(1) is there any way to map one URL to another when neither of them is  
a controller/action?

i.e., the user enters [http://foo.com/bar/baz](http://foo.com/bar/baz), and the static resource  
living at public/zoom/pop.mp3 gets served?

(2) is there any way to see the _actual_ response headers that are  
_actually_ returned by the server? I know I can telnet to the port and  
type in a request, but I want to see what happens when a Flash movie  
internally makes a request. It seems to work if I make the request  
myself through the browser or through manual (telnet) http, but it’s  
not working when the Flash movie makes it so I want to see the raw http  
that the server is serving up. Suggestions?

thanks,  
brian

---

<div class="post-metadata">

**Author:** ![brian.estlin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7bcc69/32.png) [@brian.estlin](https://www.ruby-forum.com/u/brian.estlin)\
**Post date:** [October 22, 2006, 2:58pm UTC](https://www.ruby-forum.com/t/static-url-rewriting-response-headers/73060/2 "2006-10-22T14:58:43Z")

</div>

On 10/20/06, brian.estlin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> hi all,
> 
> two questions:
> 
> (1) is there any way to map one URL to another when neither of them is  
> a controller/action?
> 
> i.e., the user enters [http://foo.com/bar/baz](http://foo.com/bar/baz), and the static resource  
> living at public/zoom/pop.mp3 gets served?

Don’t know, sorry. Seems like it would be useful to have a generic way  
to specify a base uri in rails so that for example a site could be  
served from behind a proxy with a different url relative to /

> (2) is there any way to see the _actual_ response headers that are  
> _actually_ returned by the server? I know I can telnet to the port and  
> type in a request, but I want to see what happens when a Flash movie  
> internally makes a request. It seems to work if I make the request  
> myself through the browser or through manual (telnet) http, but it’s  
> not working when the Flash movie makes it so I want to see the raw http  
> that the server is serving up. Suggestions?

I suggest you investigate these:

[http://livehttpheaders.mozdev.org/](http://livehttpheaders.mozdev.org/)

> **[Wireshark · Go Deep](https://www.wireshark.org/)**
>
> Wireshark: The world's most popular network protocol analyzer

[http://www.circlemud.org/~jelson/software/tcpflow/](http://www.circlemud.org/~jelson/software/tcpflow/)  
[http://netcat.sourceforge.net/](http://netcat.sourceforge.net/)

–  
noodl
