Nginx Rewrite rules for clean URLs
Posted
by
Sujay
on Server Fault
See other posts from Server Fault
or by Sujay
Published on 2009-10-15T21:01:54Z
Indexed on
2011/07/01
8:24 UTC
Read the original article
Hit count: 395
I want to write nginx rewrite rules for clean URLs.
Everytime the user hits http://domain.com/abc/12/16/abc-def-ghi I need to execute domain.com/abc.php?a=12&b=16&c=abc-def-ghi.
Now my regex is right as per rubular: ^\/abc\/(\d+)\/(\d+)\/(\w+\S+)$
http://rubular.com/regexes/11063
and rule is
if (!-e $request_filename) {
rewrite ^\/abc\/(\d+)\/(\d+)\/(\w+\S+)$ abc.php?a=$1&b=$2&c=$3 last;
}
But it is giving "No input File specified". I cant find what the problem is?
© Server Fault or respective owner