Forum Moderators: phranque
RewriteCond %{THE_REQUEST} ^files/ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ ([^/]+/)*index\.php\?folder=M/IPHONE([^\ ]+)\ HTTP/
RewriteRule ^files/index\.php http://www.example.com/files/index.php?folder=M/IOS/%1 [R=301,NC,L]
...\?folder=M([^\ ]+)\ HTTP/ without a slash in your pattern (where "..." represents existing code that you don't alter), and redirect to example.com/?target=M%1 and see what the slash looks like in the address bar of the browser after the redirect. Don't worry that the redirected URL returns 404, you're only interested in what the address bar changes to. Redirect to a completely different hostname if you want, you're only interested in what the new URL "looks" like. [edited by: g1smd at 12:45 pm (utc) on Feb 7, 2013]