URL重写多个链接或阻止某些链接

时间:2015-06-03 05:08:58

标签: iis rewrite

我们为一个网站提供以下网址/绑定

  • test.se.local / *
  • test.en.local / *
  • test.se.local / cms / *
  • test.en.local / CMS / *
  • test.se.cms.local / *
  • test.en.cms.local / *
  • test.se.cms.local / CMS / *
  • test.en.cms.local / CMS / *

如何实施以下重写?

  • test.se.cms.local / * - > test.se.local / *
  • test.en.cms.local / * - > test.en.local / *
  • test.se.local / cms / * - > test.se.cms.local / CMS / *
  • test.en.local / cms / * - > test.en.cms.local / CMS / *

或者如何阻止IIS上的以下链接

  • test.se.cms.local / *
  • test.en.cms.local / *
  • test.se.local / CMS / *
  • test.en.local / CMS / *

IIS版本是IIS7和IIS8

1 个答案:

答案 0 :(得分:0)

您可以为每个网址重写:

public void init(){

    this.Chromosone = new BitArray (36);

    for(int i = 0; i  < this.Chromosone.Length; i++){
        if(Random.Range(0,2) == 1)
            this.Chromosone.Set(i,true);
        else
            this.Chromosone.Set(i,false);
    }

    lifeTime = Random.Range (1, 3);
    Debug.Log (Chromosone);

}