Forum Moderators: phranque
Thanks a lot!
RewriteCond %{REQUEST_URI} !^/gallery/files/
RewriteRule ^([^/]+/)*files/(.*)$ wp-content/blogs.php?file=$2 [L]
Be aware that since it is the client (e.g. browser) that resolves relative links, and since the browser is not aware that you have rewritten the URLs, you may have some trouble with page-relative links to images, CSS, included external JavaScript files, etc. If so, use server-relative links or canonical links on your pages instead, i.e. use <img src="/images/logo.gif"> or <img src="http://example.com/images/logo.gif">, instead of <img src="images/logo.gif"> or <img src="../images/logo.gif">
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim