2

How can I convert address of uploaded files from example.com/sites/default/files/file1.zip to dl.example.com/file1.zip?

Is there a module for this purpose? If not what's the solution?

3

In my opinion if you can create a subdomain dl.example.com then you can also redirect all requests to default/files subfolder using symbolic link in /home/domains/dl.example.com/ linking to /home/domains/example.com/sites/default/files/ depending on your .htaccess or httpd.conf setup.

Please note I don't think this is a Drupal-specific question, I am not an expert on this and you'd better asked on https://serverfault.com/

I think using this method will be faster then creating a custom module to do this for you because the method I explained doesn't even require loading Drupal for the request handling.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.