I'm focusing on a client's site that once had all .swf files in sites via product code eg. g18/g18_flashfile.swf however i have moved them into assets/flash/g18_flashfile.swf

I've attempted to mod_rewrite the request towards the new location because of exterior sites hotlinking towards the file. This just error 500s

RewriteRule ^([^/]+)/([^.]+)\.swf$ assets/flash/$1/$2\.swf [L]

I additionally cannot just perform a redirect anything like me already while using following

RewriteRule ^(.*)/$ product.php?ref=$1 [L]

Any help could be great like me itching my mind on that one.

EDIT

What is even stranger happens when I actually do

RewriteRule ^([^/]+)/([^.]+)\.swf$ assets/flash/$1/$2\.html [L]

It really works (clearly it 404s since there is not b .html code file) however the rewrite works. Does anybody determine if swf are a handful of type of expression used in mod_rewrite?

The standard expression

^([^/]+)/([^.]+)\.swf$

matches both g18/g18_flashfile.swf and assets/flash/g18_flashfile.swf. Because the L flag might not work as you expected, this can be a problem.

Just alter the regular expression to ensure that it does not suit your rewritten path:

RewriteRule ^([^/]+)/([^/.]+)\.swf$ assets/flash/$1/$2\.swf [L]