Welcome! Log In Create A New Profile

Advanced

Re: How Evil is If?

B.R.
May 25, 2012 11:54AM
You have well-documented pages about that.
http://wiki.nginx.org/IfIsEvil (which also expalins why 'if' is evil)
http://wiki.nginx.org/Pitfalls

Are you trying to make the community do your part of the job? ;o)
---
*B. R.*


On Fri, May 25, 2012 at 1:51 AM, CheezItMan <nginx-forum@nginx.us> wrote:

> In my wordpress Multisite config, I have the below lines. I've read
> if-is-evil and so I'm curious if these ifs need to be replaced and with
> what?
>
>
> ---
>
> # For multisite: Use a caching plugin/script that creates symlinks to
> the correct subdirectory structure to get some performance gains.
> set $cachetest
> "$document_root/wp-content/cache/ms-filemap/${host}${uri}";
> if ($uri ~ /$) {
> set $cachetest "";
> }
> if (-f $cachetest) {
> # Rewrites the URI and stops rewrite processing so it doesn't
> start over and attempt to pass it to the next rule.
> rewrite ^ /wp-content/cache/ms-filemap/${host}${uri} break;
> }
>
> if ($uri !~ wp-content/plugins) {
> rewrite /files/(.+)$ /wp-includes/ms-files.php?file=$1 last;
> }
>
> # Uncomment one of the lines below for the appropriate caching plugin
> (if used).
> # include global/wordpress-ms-subdir-wp-super-cache.conf;
> # include global/wordpress-ms-subdir-w3-total-cache.conf;
>
> # Rewrite multisite '.../wp-.*' and '.../*.php'.
> if (!-e $request_filename) {
> rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
> rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
> }
>
> ---
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,226819,226819#msg-226819
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How Evil is If?

CheezItMan May 25, 2012 01:51AM

Re: How Evil is If?

B.R. May 25, 2012 11:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 207
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready