<div>
<p>Hi guys,</p>
<p>I am running php with nginx, with fastcgi. But instead of heaving my urls like <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.myblog.com/index.php/bla/bla" target="_blank" rel="nofollow">www.myblog.com/index.php/bla/bla
</a> I would like <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.myblog.com/bla/bla." target="_blank" rel="nofollow">www.myblog.com/bla/bla</a></p>
<p>With the setup at the end of the mail, it redirect if a file can't be found to index.php, but I get the content of index.php back. (So if I go to <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.myblog.com/bla/bla" target="_blank">
www.myblog.com/bla/bla</a>).<br></p>
<p>But I also have other requests that should not be rewritten (directories and files in the root directory). Is this possible? to redirect only if <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.myblog.com/bla/bla" target="_blank" rel="nofollow">
www.myblog.com/bla/bla</a> doesn't exist to a normal request to the root directory and send that to the fastcgi process?</p>
<p></p>I really love nginx, and thanks to this mailinglist I didn't need much help. But most rewrite rules are written wordpress MU (multiuser) and not wordpress redux. I just need to to rewrite all request that do not exists to
index.php and pass this to fastcgi.<br><br>I did get this working one time.. but I can't figure out how I did it :S<br><pre><code>server {<br> listen 80; # Replace this IP and port with the right ones for your requirements
<br> server_name <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.myblog.com/" target="_blank" rel="nofollow">www.myblog.com</a><br><br> #charset koi8-r;<br><br> #access_log logs/host.access.log
<br><br> location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov)$ {
<br> root /var/www/blog;<span></span><br> }<br><br> error_page 404 /index.php;<br><br> location ~ \.php$ {<br> include /etc/nginx/fastcgi.conf;<br> fastcgi_pass <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://127.0.0.1:8888/" target="_blank">
127.0.0.1:8888</a>;<br> fastcgi_index index.php;<br> fastcgi_param SCRIPT_FILENAME /var/www/blog/$fastcgi_script_name;<br> }<br><br> # deny access to .htaccess files, if Apache's document root
<br> # concurs with nginx's one<br> #<br> #location ~ /\.ht {<br> # deny all;<br> #}<br><br> }</code></pre></div><br clear="all"><br>-- <br>Abdul-Rahman Advany<br><br>IM: <a href="mailto:abdulrahman@advany.com">
abdulrahman@advany.com</a>