I currently have a url http://www.goo.com/about.php?lang=cn
and wants to rewrite as http://www.goo.com/about?lang=cn
I tried as follows:
location / {
try_files $uri $uri/ $uri?$lang=arg_lang
}
But somehow doesn't work.
I tried accessing http://www.goo.com/about
which works. But, whenever I pass an argument as http://www.goo.com/about?lang=cn
doesn't seem to work.
I have also found that the above rule works with http://www.goo.com/about.php?lang=cn
.
I basically wants to hide .php
and use arguments in the url