I wanted to be able to share links to files in my Dropbox using my own domain instead of http://dl.dropbox.com/u/1234567/…
I created a subdomain, dl and pointed it to a directory on my hosting account. In that directory I placed
an .htaccess file with the code below. Now I can share files from my Dropbox account using
http://dl.chouinard.me/filename.ext
I’m using this to share files that are too large for email. This has nothing to do with hosting content on Dropbox.
# Check to see if mod_rewrite is installed / avaliable RewriteEngine on # Check to see if file or directory exists RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite to Dropbox URL. Make sure you change the data after "/u/" (9502594) to your own user ID RewriteRule ^e/(.*)$ http://dl.dropbox.com/u/1234567/$1 [L,QSA] # Embedded File RewriteRule ^(.*)$ http://dl.dropbox.com/u/1234567/$1?dl=1 [L,QSA] # Force Download (Default)
Just be sure to replace 1234567 with your own Dropbox user ID.