我需要在Ubuntu 12.04的Nginx配置中复制以下Apache重写规则。什么是nginx等效于:
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
          
                  stackoverflow.com/questions/14832780/…–
                
                
                  
                    —
                     cnst 
                    
                  
                
              
                  谁在网上找到此文件并尝试复制并粘贴建议的答案,请注意,如果您使用的是带有自定义端口的Virtualbox设置。我不得不改变它是如
                
                  
                    —
                    aexl 
                    
                  
                
              rewrite (.*)//+(.*) $scheme://$host:4321$1/$2 permanent;其中4321是Virtualbox'd的外部端口nginx的我的浏览器连接到。