Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite proxy|P please help!

         

akeyo

11:40 pm on Dec 26, 2010 (gmt 0)

10+ Year Member



Hey guys, so I have created a website to upload and host .swf (adobe flash) files. To save on bandwidth all files are uploaded to amazon S3 because of the cheap pricing.

I want to hide the source amazon url... Currently the urls look like this.
swfupcloud.s3.amazonaws.com/1292046650.swf

I would love to be able to achieve this:
User goes to: swfup.com/swf/123.swf
and it redirects to swfupcloud.s3.amazonaws.com/123.swf

the actual filenames will be corresponding EG: 123.swf on both urls.
If possible i would love for the url in the browser to not change so even though its redirecting to view the swf the url stays as swfup.com/swf/123.swf

I have done some research and gotten a little help and someone told me i should use mod_rewrite and proxy|P but im VERY new to this.

Any help greatly appreciated!

wilderness

5:20 pm on Dec 27, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



mod_proxy is a separate and optionally installed module, than mod_rewrite.

Try a google and search the Apache website.

jdMorgan

5:06 pm on Jan 5, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The use of mod_proxy is not desirable here, since all .swf requests and responses would then pass through your own server on the way to or from the Amazon S3 server. That would entirely defeat the purpose of using cloud hosting for these files.

There is no solution to the problem on your own server. Consider creating a subdomain for your media files, and asking Amazon to point that subdomain to their server using DNS. Then you can just link to your .swf files on the subdomain of your own domain, and they will be served from Amazon's server.

Alternately, define the new subdomain in your own DNS to point to a CNAME of Amazon's server domain. (This will only be possible if you have direct control of DNS zone file.) I suspect that use of a CNAME will be required, because Amazon may wish to re-assign their own IP addresses from time to time.

You will have to contact Amazon cloud support to see if this is possible, as I do not know much about using their services.

Jim