Forum Moderators: phranque
Here's the rewrite rule:
RewriteRule ^(.*)/(.*)/flowplayer\.swf$ /flowplayer-3.1.2.swf?config={"clip":{"url":"/video/$2.flv","autoPlay":false,"autoBuffering":true},"plugin
s":{"controls":{"url":"/flowplayer.controls-3.1.2.swf","time":true,"volume":false,"fullscreen":false}}}
I'm guessing that the characters '{','}',',','"', and ':' are part of the problem. I've tried escaping them like this \{ etc, but without any luck.
Can anyone advise me on what the problem may be?
Thanks!
Do that first, and then remove "\" escaping on all characters which do not require it. Then consider using both the [NE] and [L] flags on your rule, combined as [NE,L] to prevent hex-encoding of 'special' characters if needed -- see the mod_rewrite documentation.
Also note that "(.*)/(.*)" is a horribly-inefficient sub-pattern, and you might take a lot of load off your server by making it more specific -- for example, by using "([^/]+)/([^/]+)" if your URL-parameters are always demarcated by slashes (and do not contain slashes themselves).
Jim
Using your method of a temporary external redirect I managed to weed out some of the problems (an errant space in one of the parameters, that was working fine in the original url as an %20 was automatically appended, but with the redirect an 0 was creeping in).
So I got it working fine on the external redirect. When I change back, then, to the internal rewrite, though, it's still not working.
Your suggestions though have got me a lot closer, and on the right track - thanks! (I've also taken on-board your point about the inefficiency of the sub-pattern).
Edited: Can't *bleepin* type sumtimes!