奥飞火千万电 发表于 2018-9-1 07:24:14

利用perl提取web配置文件中的域名对应的路径

server  {
  listen      80;
  server_name www.mcshell.org mcshell.org;
  index    index.php index.html index.htm;
  root    /data0/web/mcshell;
  error_page 404 =http://www.mcshell.org;
  if (!-f $request_filename){
  set $rule_0 1$rule_0;
  }
  if (!-d $request_filename){
  set $rule_0 2$rule_0;
  }
  if ($rule_0 = "21"){
  rewrite ^/(.*)\?*$ /index.php?_route_=$1 last;
  }
  if ($host != 'www.mcshell.org' ) {
  rewrite ^/(.*)$ http://www.mcshell.org/$1 permanent;
  }
  ..
  ..

页: [1]
查看完整版本: 利用perl提取web配置文件中的域名对应的路径