Flash player stops when rewriting url

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 8
Joined: 07 Aug 2012, 04:26

Flash player stops when rewriting url

14 Aug 2012, 09:37

I have an asp page that dynamically loads a flash movie based on a url querystring.
/media/movie.asp?movie=mymovie.flv
I want to use links on the site like this:
mysite.com/movie/mymovie

The asp page displays and plays the movies when I acces it directly with the full url and querystring so I know it works. However when I rewrite the url from a link the flash player no longer loads the movie file. The asp page will append .flv if there is none in the querystring

I'm using this rule:
RewriteRule ^movie/([^?/]+) /media/movie.asp?mov=$1 [NC,L]

This redirects to the page and also sets the movie parameter via the querystring but the flash player stops working.
I have tried setting all the file references to absolute as well as relative but it makes no difference.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Flash player stops when rewriting url

14 Aug 2012, 17:17

try using the following combination:

RewriteCond %{QUERY_STRING} ^mov=([^.]+)\.flv$ [NC]
RewriteRule ^media/movie\.asp$ /movie/%1? [NC,R=301,L]

RewriteRule ^movie/([^/]+)$ /media/movie.asp?mov=$1.flv [NC,L]



Regards
Andrew

User avatar
Posts: 8
Joined: 07 Aug 2012, 04:26

Re: Flash player stops when rewriting url

14 Aug 2012, 17:38

Really appreciate your help - Thanks.
I tried your suggestion but the page still doesn't play the vid.
If you browse directly to the asp page it plays fine:
http://www.hbingredients.co.uk/system/m ... te_eti.flv

This is the same page but with a friendly url
http://www.hbingredients.co.uk/movie/Gr ... ateTmd_v21

I suspect the problem is in the way the flash player is referenced and loaded at runtime.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Flash player stops when rewriting url

15 Aug 2012, 06:19

Yes, it seems like you need to tweak the player now to make it work. You may also check if passing Header will work.

Regards
Andrew

User avatar
Posts: 8
Joined: 07 Aug 2012, 04:26

Re: Flash player stops when rewriting url

15 Aug 2012, 06:38

I'm not sure what you mean by "passing header"

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Flash player stops when rewriting url

15 Aug 2012, 07:29

I'm not sure I understand the whole procedure. So I was guessing if querystring is not the only source of date for player.

Regards
Andrew

User avatar
Posts: 8
Joined: 07 Aug 2012, 04:26

Re: Flash player stops when rewriting url

15 Aug 2012, 11:05

No, there is only the querystring. This tells the page which movie to load. On my test page you can see the querystring at the top of the page. If you view the source code you can see this has been placed into the correct location within the javascript that should load the Flash movie player.

The reason I came onto this forum was because the page only breaks when using the url rewrite, so I'm guessing that there must be some link which is probably related to the location of referenced files and using relative or absolute paths. I have seen this before with css files and favicons. I have tried it both ways and it still didn't work.

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: Flash player stops when rewriting url

16 Aug 2012, 05:55

Seems like it's players issue, unfortunately.

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 15 guests