<div>I think is better idea to make all requests into php file</div><div><br></div><div>fastcgi_param  SCRIPT_FILENAME /www/xxx/index.php;<br>     <br></div><div>and, parse url with PHP. Use $_SERVER[&#39;REQUEST_URI&#39;] for take URL.</div>
<div><br></div><div>Sorry for my poore english</div><br><div class="gmail_quote">On Sat, Jan 30, 2010 at 12:22 PM, Harish Sundararaj <span dir="ltr">&lt;<a href="mailto:tuxtoti@gmail.com">tuxtoti@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi All,<br><br>I need to implement a SEO/permalink related rewrite rule on nginx. I&#39;m not sure how i would do it. <br>
This is what I want:<br><br>I have a list which is something like this:<br><br>keyA : a1,a2<br>keyB : b1,b2<br>

keyC : c1, c2<br>.<br>.<br>.<br>.<br>KeyZ : z1,z2<br><br>Now the access URL will be  like this: ---&gt;   <a href="http://example.com/results/myquery/keyB-keyD-keyK" target="_blank">http://example.com/results/myquery/keyB-keyD-keyK</a> <br>


This should translate to :---&gt;  /results?q=myquery&amp;keyvals=b1,b2,d1,d2,k1,k2<br>The point here to note is I will not know the number of &quot;key&quot; terms that&#39;ll be present in the URL . In the above example I have 3 terms (keyB,keyD and keyK) ..But there could be any number of them.<br>


<br>I have a couple of questions now:<br>1) I think i should use &quot;set&quot; to define the key list initially. Is this the right way? or should I be doing something else?<br>2) If I have a predefined number of keyterms in the URL i can use the $1,$2 ...to match it. But if I don&#39;t know the number of terms that&#39;ll be present what should i be doing?<br>


<br>It&#39;ll be great if someone can help me with this.<br><br>Regards<br><font color="#888888">Harish<br><br><br>
</font><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Pagarbiai.<br>