Last active
January 28, 2016 21:56
-
-
Save ryanscherler/92e005ca8d33df6ac29c to your computer and use it in GitHub Desktop.
ProcessWire - Redirect site files to production server for local 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
# ----------------------------------------------------------------------------------------------- | |
# Redirects all file requests that do not exist locally to the production server | |
# ----------------------------------------------------------------------------------------------- | |
# Force local files that exist to be generated. | |
RewriteCond %{REQUEST_URI} ^/site/assets/files/[^\/]*/((.*))$ | |
RewriteCond %{DOCUMENT_ROOT}/site/assets/files/%1/%2 -f | |
RewriteRule ^(.*)$ $1 [QSA,L] | |
# Otherwise, send anything else that's in the files directory to the production server. | |
RewriteCond %{REQUEST_URI} ^/site/assets/files/[^\/]*/.*$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ http://www.breakthrough.org/$1 [QSA,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment