Forum Moderators: phranque
the following directive (external redirect) works just fine for me:
RewriteRule ^/v/([0-9]+)$ /MediaPlayer.swf?MediaID=$1&Embed=true [L,R=301]
while transforming the same exact rule into an internal one makes the swf file not load properly:
RewriteRule ^/v/([0-9]+)$ /MediaPlayer.swf?MediaID=$1&Embed=true [L]
The swf gets accessed in both cases, but in the second one it doesn't work the way it's supposed to, it seems it's not able to load its dependencies (assets.swf ..). Any idea what is causing this and how to solve this problem ?
thank you,
Catalin
So a solution might be to modify the scripts to use the correct directory location as the base filesystem (directory) path to find the included objects.
Before rushing off to do that though, take a look at the client/server transactions using the "Live HTTP Headers" add-on for Firefox/Mozilla (or similar) -- It may be that all you'll need to do is put a few more rewrites in place to re-map the other URL requests for related objects to the proper filepath as well -- e.g. rewrite URL request http://example.com/v/assets.swf --> filepath /assets.swf.
Jim
RewriteRule ^([0-9]+)$ /MediaPlayer.swf?MediaID=$1&Embed=true [L]
it still doesn't work. Also all files are grabbed from another domain all together.
Checking out with Live HTTP the differences between the files that the 2 instances request ( domain.com/MediaPlayer.swf?MediaID=$1&Embed=true vs domain.com/123 ) I have noticed the second doesn't request all the files it's supposed to
Any idea what can cause this ?
Thanks
Do be sure to completely flush (delete) your browser cache between tests, so that browser caching doesn't interfere with your test results.
In all cases -- while checking URLs with the headers checker and when looking at filepaths in your server error log(s), pay close attention to the paths and be sure they are correct.
If you have any client-side code (e.g. JavaScript), make sure it's not using the .swf file's URL to 'build' the URLs for the other objects that need to be requested, since that .swf URL has now been changed and gets rewritten. Any URLs based on this changed URL will also need to be rewritten -- (whether you add directory paths like "/v/", or not).
Jim