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?
滿天的星座2017-05-16 17:30:42
location ~ ^/aaa.swf {
root /var/www/bbb.com # the local file path of bbb
# use rewrite to map aaa.swf to bbb
}
仅有的幸福2017-05-16 17:30:42
If they are not on the same host, it can be achieved through a reverse proxy
Add the following statement in the bbb.com
的server {}
block.
location / {
if ($uri = /bbb)
{
rewrite ^/bbb$ /aaa.swf break;
proxy_pass http://aaa.com;
}
}