nawawa001 发表于 2017-12-23 20:32:12

Nginx笔记总结十三:sub

location ~* ^/portalproxy/(*)/portal(.*)$ {  #sub_filter
'302 Found' 'success';  #sub_filter_once off;
  set $bodyContent
'<html><head><title>success</title></head><body><script>location.href="http://$host/portalproxy/portal?url_timetemp  
=$1$2";</script></body></html>';
  #rewrite '^/portalproxy/(*)/portal$' http://$host/portalproxy/portal?url_timetemp=$1 break;
  add_header Content-Type "text/html";
  return 200 $bodyContent;
  }
页: [1]
查看完整版本: Nginx笔记总结十三:sub