Skip to content

Instantly share code, notes, and snippets.

@dplummer
Created July 15, 2011 16:51
Show Gist options
  • Save dplummer/1085057 to your computer and use it in GitHub Desktop.
Save dplummer/1085057 to your computer and use it in GitHub Desktop.
Patch for frontend.conf dev site rewrite
--- frontend.conf.original 2011-07-15 09:49:50.468952712 -0700
+++ frontend.conf 2011-07-15 09:55:06.948947048 -0700
@@ -39,6 +39,10 @@
if ($host ~* (.*)\.crystalcommerce\.com) {
set $client $1;
}
+ # get the client name if it matches client.crystalcommerce.com
+ if ($host ~* (.*)\.dev\.crystalcommerce\.com) {
+ set $client $1/dev;
+ }
# finally, rewrite /files to /themes/clients/client
if ($request_uri ~* ^\/files) {
rewrite ^\/files/(.*)$ /themes/clients/$client/$1 last;
@@ -100,6 +104,10 @@
if ($host ~* (.*)\.crystalcommerce\.com) {
set $client $1;
}
+ # get the client name if it matches client.crystalcommerce.com
+ if ($host ~* (.*)\.dev\.crystalcommerce\.com) {
+ set $client $1/dev;
+ }
# finally, rewrite /files to /themes/clients/client
if ($request_uri ~* ^\/files) {
rewrite ^\/files/(.*)$ /themes/clients/$client/$1 last;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment