For example, instead of using “dirty” url`s in your web application (like test.php?param=1&val=342&fuck=bla) you can use very nice links (/this/is/nice/link/). And also, redirect all the requests to single file.
nginx configuration:
location / {
root /var/site/public_html;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*)/$ /index.php?path=$request_uri last;
}
}The same for Apache 2:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ index.php?path=%{REQUEST_URI} [NCL]
How 2 set up this config on Windows version of nginx?
I mean this part [[[ location / {
root /var/site/public_html; ]]]
something like: root Z:/WWW; <– not working for me
I never used nginx under windows, but i guess this is something about your problem – http://www.ruby-forum.com/topic/172663
http://nicholasorr.com/blog/2008/11/22/solved-nginx-php-fastcgi-win32-no-input-file-specified/
also, i checked out the wiki with small config example for windows: http://wiki.nginx.org/NginxMediaWiki
Спасибо))