0
正如前面Nginx的重寫永久
/movies/the-last-song.html
現在我有這麼:
/movie/the-last-song
目前我這個嘗試,但不起作用。
rewrite ^/movies/(.*)$.html /movie/$1 permanent;
我很感激任何幫助。謝謝。
正如前面Nginx的重寫永久
/movies/the-last-song.html
現在我有這麼:
/movie/the-last-song
目前我這個嘗試,但不起作用。
rewrite ^/movies/(.*)$.html /movie/$1 permanent;
我很感激任何幫助。謝謝。
刪除正則表達式中的$
標誌。它代表行尾,所以.html
永遠不會匹配。您還應該跳過.
作爲\.
。
rewrite ^/movies/(.*)\.html /movie/$1 permanent;