Thank you very much!
----- Original Message ----
From: Igor S. [email protected]
To: [email protected]
Sent: Sunday, March 1, 2009 7:29:37 PM
Subject: Re: New to nginx
On Sat, Feb 28, 2009 at 09:03:14PM -0800, Ivan L. wrote:
Why do you use “^/search$” ?
I use this for the queries like “search?q=search_string”
Then you need just:
location = /search {
rewrite ^ /index.php?where=search last;
}
location /posts {
rewrite ^/posts/(\d)$ /index.php?posts=$1 last;
}
What do you expect here ?
I wanted only GET|HEAD availability on some pages, and only POST on some pages.
location = /about {
if ($request_method != GET) {
return 405;
}
rewrite ^ /index.php?where=about last;
}
or
location = /about {
limit_except GET {
deny all;
}
rewrite ^ /index.php?where=about last;
}
What do you expect here ?
That suppose to be a page that only accepts POST.
location = /contact {
if($request_method != POST) {
return 405;
}
rewrite ^ /index.php?where=contact last;
}
location /downlods/ {
rewrite ^downloads/(.*)$ /downloads/$1 break;
return 403;
}What do you expect here ?
That’s downloads folder, I wanted to disable directory listing.
Just:
location /downlods/ {
}