Flash player stops when rewriting url
8 posts
• Page 1 of 1
Flash player stops when rewriting url
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.
/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.
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Flash player stops when rewriting url
try using the following combination:
Regards
Andrew
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
Re: Flash player stops when rewriting url
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.
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.
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Flash player stops when rewriting url
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
Regards
Andrew
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Flash player stops when rewriting url
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
Regards
Andrew
Re: Flash player stops when rewriting url
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.
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.
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Flash player stops when rewriting url
Seems like it's players issue, unfortunately.
Regards
Andrew
Regards
Andrew
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 15 guests