Rewrite
Silvio Siefke
siefke_listen at web.de
Thu Apr 19 23:53:50 UTC 2012
Hello,
i want use rewrite to use article-"id".php to the post.php?id=1 for example.
I has written the follow in the server section:
location /article-(\d+)\.php$ {
try_files $uri $uri/ /post.php?id=$1;
}
But it want not run. When i give http://example.com/blog/article-1.php,
nginx not change to http://example.com/blog/post.php?id=1
192.168.0.20 - - [20/Apr/2012:01:52:16 +0200] "GET /blog/article-1.php HTTP/1.1"
404 27 "http://silviosiefke_de/blog/pdo-read.php" "Mozilla/5.0 (Windows NT 5.1)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19" "-"
Has someone idea whereis the mistake?
Thanks for help.
Regards
Silvio
More information about the nginx
mailing list