nginx file redirection problem
怪我咯
怪我咯 2017-05-16 17:28:42
0
2
651

The original address is http://aaa.com/aaa.swf

The new address is http://bbb.com/bbb (no .swf, the program automatically loads it)

In this case, how can we achieve automatic loading of the new address (not jump) when accessing the source address?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all (2)
滿天的星座
location ~ ^/aaa.swf { root /var/www/bbb.com # the local file path of bbb # use rewrite to map aaa.swf to bbb }
    仅有的幸福

    If they are not on the same host, it can be achieved through a reverse proxy

    Add the following statement in thebbb.comserver {}block.

    location / { if ($uri = /bbb) { rewrite ^/bbb$ /aaa.swf break; proxy_pass http://aaa.com; } }
      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!