WP Super Cache: "try_files" aren't allowed in "if" block
Igor Clark
lists at ruby-forum.com
Fri Sep 25 23:58:35 MSD 2009
Maxim Dounin wrote:
> Try something like this:
>
> location /my-blog {
> if ($http_cookie ~ "comment_author_|wordpress|wp-postpass_") } {
> rewrite ^/my-blog(.*) /my-blog-loggedin$1 last;
> }
>
> # non logged in users
>
> try_files $uri $uri/
> /my-blog/wp-content/cache/supercache/$http_host/$uri/index.html
> /my-blog/index.php;
> }
>
> location /my-blog-loggedin {
> internal;
> rewrite ^/my-blog-loggedin(.*) /my-blog$1 break;
> try_files $uri $uri/ /my-blog/index.php;
> }
Thank you Maxim, I think that's what I'm looking for! Nice lateral
thinking.
Best
Igor
--
Posted via http://www.ruby-forum.com/.
More information about the nginx
mailing list