2013-07-04 127 views

回答

0

尝试nginx HttpRewriteModule你不需要代理这些(寿)。 它的格式如下:

rewrite regex   replacement        flag 
    |  |    |         | 
rewrite ^/ http://www.example.com/image/file.aspx?img=1 permanent; 

然后:

location/{ 

    rewrite ^/ http://www.example.com/image/file.aspx?img=1 permanent; 

} 
+0

当我打了浏览器的基本URL http://www.example.com/,它将动态追加在url一些额外的参数http://www.example.com/image/file.aspx?img=1打开页面。如何在nginx中配置这样的基础url? – user87267867

+0

动态追加参数将从用户隐藏。基地网址将内部重定向到example.com/image/file.aspx?img=1 – user87267867

+0

然后编辑您的问题。并把你正在尝试的代码 – jmingov