server {
if ($host ~* ^example.com) {
rewrite ^(.*) http://www.example.com permanent;
}
}
當我發送 http://example.com/aa.jsp?time=1
這樣的請求的時候。轉發的請求變成了 http://www.example.com/aa.jsp
問號之後的參數都被丟棄了? ? ?
請問如何設定能部丟棄問號之後的參數?謝謝謝謝
習慣沉默2017-05-16 17:26:51
if ($host = 'example.com' ) {
重寫 ^/(.*)$ http://www.example.com/$1 permanent;
}