Jon Simpson

Cleaner URLs for Dropbox Public Files

21 May 2013 — dropbox, htaccess

The URLs generated by the Dropbox public folder are quite long and not particularly friendly. Inspired by Matt Henderson’s subdomain redirect approach, some .htaccess magic can allow a path on another site to redirect all requests within it to the Dropbox public folder - just insert your Dropbox user ID in place of 123123 (you can find it after the /u/ in the public links Dropbox generates for you)

RewriteEngine On
RewriteBase /
RewriteRule ^db/(.*)$1 [R=301,L]

The above rewrite rule means that requests for any file under will redirect, complete with filename to - making it easy to provide a clean link to anything in your public folder.