# Flash attachment

**URL:** <https://www.ruby-forum.com/t/flash-attachment/91632>\
**Category:** Radiant CMS\
**Created:** [April 10, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/flash-attachment/91632 "2007-04-10T23:53:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f05b48/32.png) [@keith](https://www.ruby-forum.com/u/keith)\
**Post date:** [April 10, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/flash-attachment/91632/1 "2007-04-10T23:53:25Z")

</div>

All,

I want to add a flash mp3 player to all pages but the flash player has  
to be  
in the same folder as the page to play - this means that each page (eg.  
/info/) cannot access the flash. As the site is not static I cannot  
simply  
upload the flash to each directory. Any ideas how I can get this to work  
people?

Keith

---

<div class="post-metadata">

**Author:** ![keith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f05b48/32.png) [@keith](https://www.ruby-forum.com/u/keith)\
**Post date:** [April 10, 2007, 11:57pm UTC](https://www.ruby-forum.com/t/flash-attachment/91632/2 "2007-04-10T23:57:26Z")

</div>

> I want to add a flash mp3 player to all pages but the flash player has to be  
> in the same folder as the page to play - this means that each page (eg.  
> /info/) cannot access the flash. As the site is not static I cannot simply  
> upload the flash to each directory. Any ideas how I can get this to work  
> people?

You can use Apache’s mod\_rewrite to match a particular pattern in the  
URL and either proxy the request to the proper URL or redirect.

RewriteRule myflashfile.swf$ [http://localhost:3000/myflashfile.swf](http://localhost:3000/myflashfile.swf) [P]

will load the Flash file for each request that ends with  
myflashfile.swf.

I hope this helps.

Cheers,  
Oliver
