Worked like a charm... <br>Even tho&#39; Chris Wells (big thanks again) suggested earlier on irc<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!-e $request_filename) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite ^(.*)(/wp-content/themes/.*) $2 last;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite ^/.*$ /index.php last;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>which worked too but i didnt managed to reply to list to tell you as i was testing more stuff on it..<br>As i was testing with ab2 -n 1000 -c 100 <a href="http://sub.domain.tld/blog1/files/2007/02/40kb.jpg">
http://sub.domain.tld/blog1/files/2007/02/40kb.jpg</a> getting only ~230req/sec i noticed that php-cgi got hit everytime and i don&#39;t understand why it happens that when i access a static file which should be served directly after rewrite by nginx
<br>if i do ab2 -n 1000 -c 100 <a href="http://sub.domain.tld/wp-content/blogs.dir/4/files/2007/02/40kb.jpg">http://sub.domain.tld/wp-content/blogs.dir/4/files/2007/02/40kb.jpg</a> (which is the same file only without rewrite) i get ~400req/sec
<br><br>(should i start another &quot;thread&quot; with nginx and maybe some WP related questions or i can continue here?)<br><br>Thank you again for the great/fast help.<br><br><div><span class="gmail_quote">On 2/14/07, 
<b class="gmail_sendername">Igor Sysoev</b> &lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, Feb 14, 2007 at 04:21:49PM +0300, Igor Sysoev wrote:<br>&gt; On Wed, Feb 14, 2007 at 12:09:05PM +0200, Anonymous Coward wrote:<br>&gt;<br>&gt; Let&#39;s start from the scratch:<br>&gt;<br>&gt; 1) set the root at server level,
<br>&gt; 2) and move all if/rewrite rules to server level, then they will run<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;only once:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; server {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp;&nbsp;&nbsp;/var/www/localhost/htdocs/sub.domain.tld;
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #uploaded files<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite&nbsp;&nbsp;^(.*)?/?files/(.*) /wp-content/blogs.php?file=$2;<br><br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite&nbsp;&nbsp;^(.*)?/?files/(.*) /wp-content/blogs.php?file=$2;<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite&nbsp;&nbsp;^.*/files/(.*) /wp-content/blogs.php?file=$1;
<br><br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!-e $request_filename) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite&nbsp;&nbsp;^.+?(/wp-.*)&nbsp;&nbsp;&nbsp;&nbsp; $2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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;&nbsp;&nbsp; rewrite&nbsp;&nbsp;^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/index.php&nbsp;&nbsp;last;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;<br>&gt; The &quot;^([_0-9a-zA-Z-]+)?(/wp-.*)&quot; does not match &quot;/test130/wp-content/...&quot;.<br>&gt;<br>&gt;<br>&gt; &gt; I tried that too, same result...
<br>&gt; &gt; I also looked in access.log and i noticed that i was getting 404 on these<br>&gt; &gt; files<br>&gt; &gt;<br>&gt; &gt; /test130/wp-content/themes/default/style.css<br>&gt; &gt; /test130/wp-content/themes/default/images/kubrickbg.jpg
<br>&gt; &gt;<br>&gt; &gt; On website i was trying to access sub.domain.tld/test130/&nbsp;&nbsp; (which is a blog<br>&gt; &gt; in Wordpress Mu) and on the server the files were in<br>&gt; &gt;<br>&gt; &gt; $documentroot/wp-content/themes/home/images/kubrickbg.jpg
<br>&gt; &gt; $documentroot/wp-content/themes/default/images/kubrickbg.jpg<br>&gt; &gt;<br>&gt; &gt; $documentroot/wp-content/themes/home/style.css<br>&gt; &gt; $documentroot/wp-content/themes/default/style.css<br>&gt; &gt; $documentroot/wp-content/themes/classic/style.css
<br>&gt; &gt;<br>&gt; &gt; Maybe this will clear something...<br>&gt; &gt;<br>&gt; &gt; It&#39;s seems that &quot;^([_0-9a-zA-Z-]+)?(/wp-.*)&quot; are static files, so &quot;break&quot;<br>&gt; &gt; &gt;stops rewrite cycle. The &quot;last&quot; continues rewrite cycle and request will
<br>&gt; &gt; &gt;go to &quot;location ~ .php$&quot;.<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Igor Sysoev<br>&gt; <a href="http://sysoev.ru/en/">http://sysoev.ru/en/</a><br>&gt;<br><br>--<br>Igor Sysoev<br><a href="http://sysoev.ru/en/">
http://sysoev.ru/en/</a><br><br></blockquote></div><br>