Created
December 1, 2011 23:10
-
-
Save jacine/1420589 to your computer and use it in GitHub Desktop.
My favorite Drupal trick for local theme development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find this line and insert the code below it (adapted to use your sitename/server). | |
# RewriteBase / | |
# Use files on the dev server instead of syncing them locally. | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^sites/sitename/(files/.*)$ http://dev.whatever.com/sites/sitename/$1 [L,QSA] |
The advantage of the stage file proxy module is that it "...transfers each requested file just in time when it is requested" which is generally faster for local development than hotlinking to the production site, and also gives you the benefit of having the files to work with locally eg for imagecache manipulations when you request the original file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternatively, you could:
drush dl stage_file_proxy && drush -y en stage_file_proxy
Then put this in your settings.php: