1
我需要Nginx是由URI一樣打開文件:nginx的重寫的URI到文件
http://example.com/en/foo/test-bar從/var/www/example.com/en_US/_foo_test_bar
或
從http://example.com/en/foo2/test2-bar在/ var/www/example.com/en_US/_foo2_test2_bar
替換除字母/數字之外的所有符號以進行下劃線。應該怎麼看這個位置,可能會更好使用重定向?
location /en/ {
rewrite ...
}
我不知道在nginx和regexp這種機制的最佳做法。謝謝。