How To Use Dropbox As Web Host


Dropbox does allow you to use it as web host. It is just that most of us are not aware of the exact way. I have stumble upon this tutorial and am sharing the same with you. If you use desktop client for Dropbox, then you must have noticed a folder named, as PUBLIC. We would be using this folder to use Dropbox as web host or you can say using Dropbox as web server.

There is no restriction on the type and the size of the file provided you have enough space avaiable on your cloud and its legal to distribute it. Once done with all the pre-requisites, we can kick start with the actual steps.

Use Dropbox As Web Host / Web Server

You must be aware of a feature offered by Dropbox which allows you to share it using a URL. Now, we would be using the same URL to share the files on web. This is what we would be doing.

Dropbox generally follow a simple fashion for unique URLs which is like dl.dropbox.com/u/USERID/. Here, USERID stands for your Dropbox user ID and then follow the link for the file that you want to share. And using that unique URL, you can map it to the web host you want. Now here is the way to do it:

Get to the cPanel and there you need to setup a new sub domain. Say you create the sub domain as folder.pcsplace.com.
This step would actually create a folder on your server which can be used to share files. Or say, using which you would use Dropbox as web host.

So, first thing you need to is, login to the server and create a file named as .htaccess. Now, you need to create this file inside the directory which you have created above. And in that file, copy the below piece of code:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ http://dl.dropbox.com/u/USER ID/$1 [L,QSA]
</IfModule>

Here, you need to replace USER ID by your Dropbox user ID. Once it is done, you can simply make a small change in the unique URL that Dropbox gives you and it is done. So here is the proper demo for that:

Generally, you would find the unique ID as dl.dropbox.com/u/USERID. Here, all you need to do is replace that part with folders.pcsplace.com or whatever you have created. That is it. This is how you can use Dropbox as web host or web server.

Filed under: Tips n Tricks
Tags: ,
June 17, 2011 by: Prasanth Chandra

Comments

Leave a Reply