Skip to content

Instantly share code, notes, and snippets.

@ddnode
Last active August 29, 2015 14:02
Show Gist options
  • Save ddnode/d99c2fa3bc87ab33090c to your computer and use it in GitHub Desktop.
Save ddnode/d99c2fa3bc87ab33090c to your computer and use it in GitHub Desktop.

Revisions

  1. ddnode revised this gist Jun 20, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion boost.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    set $boost "";
    set $boost_query "_";

    if ( $request_method = GET ) {
    set $boost G;
    }
    @@ -20,6 +23,5 @@ if ( $request_method = GET ) {

    if (!-e $request_filename) {
    rewrite ^/(.*)$ /index.php?q=$1 last;
    ## rewrite /(.*)/$ /index.php?q=$1 last;
    break;
    }
  2. ddnode created this gist Jun 20, 2014.
    25 changes: 25 additions & 0 deletions boost.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    if ( $request_method = GET ) {
    set $boost G;
    }

    if ($http_cookie !~ "DRUPAL_UID") {
    set $boost "${boost}D";
    }

    if ($query_string = "") {
    set $boost "${boost}Q";
    }

    if ( -f $document_root/cache/normal/$host$request_uri$boost_query.html ) {
    set $boost "${boost}F";
    }

    if ($boost = GDQF){
    rewrite ^.*$ /cache/normal/$host/$request_uri$boost_query.html break;
    }

    if (!-e $request_filename) {
    rewrite ^/(.*)$ /index.php?q=$1 last;
    ## rewrite /(.*)/$ /index.php?q=$1 last;
    break;
    }