0
我正在使用nginx。我想重寫網址。我的代碼:nginx重寫規則php的旋律
rewrite ^/([^/]*)_([a-zA-Z0-9]{9}).html$ /watch.php?vid=$2 last;
網址示例: http://104.238.130.170/hudson-against-the-grain-video_14a4e06f8.html
但是當我保存文件,然後重新啓動nginx的服務器,我得到錯誤:
[emerg] directive "rewrite" is not terminated by ";" in /etc/nginx/conf.d/default.conf:46
問題:什麼是錯的我重寫規則?
rewrite ^/([^/]*)_([a-zA-Z0-9]{9}).html$ /watch.php?vid=$2 last;