1

I am looking at redirecting urls with paramaters into directories with files that are named with the param with the nginx redirect module.

eg redirect http://mydomain.com/beep?page=3

to

http://mydomain.com/redirect/pages/3.json

I have tried several times but have failed miserably...

4

1 回答 1

0

试试这个,可能会起作用,具体取决于您的 nginx 版本。

location /beep {
    return 301 http://example.com/redirect/page/$arg_page.json
}
于 2013-10-28T05:59:55.367 回答