0
我使用這個重寫規則重定向http://example.com/a-b-c?id=learn-more到重寫URL nginx的刪除連字符
http://example.com/abc?id=learnmore
rewrite ^/a-b-c?id=learn-More http://example.com/abc?id=learnMore permanent
但它不工作!它重定向到
http://example.com/abc?id=learn-more(LEARNMORE不轉換爲LEARNMORE)。
如何實現這一目標?
'rewrite'不帶參數的工作。 –
嘗試描述整個問題 –
我在 http://example.com/abc?id=learnMore 有一個頁面,但我想,當用戶訪問 http://example.com/abc?id=learn - 更多(搜索引擎優化產生的),他將被重定向到 http://example.com/abc?id=learnMore(正如你看到的連字符被刪除) – user3382916