<font color="#333399"><font>You have well-documented pages about that.<br><a href="http://wiki.nginx.org/IfIsEvil">http://wiki.nginx.org/IfIsEvil</a> (which also expalins why 'if' is evil)<br><a href="http://wiki.nginx.org/Pitfalls">http://wiki.nginx.org/Pitfalls</a><br>

<br>Are you trying to make the community do your part of the job? ;o)</font></font><br clear="all"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font><br>


<br><br><div class="gmail_quote">On Fri, May 25, 2012 at 1:51 AM, CheezItMan <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

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