last – 基本上都用这个Flag。
break – 中止Rewirte,不在继续匹配
redirect – 返回临时重定向的HTTP状态302
permanent – 返回永久重定向的HTTP状态301

另外,有个东西很关键,曾经折腾我好几个小时才搞定,就是Nginx里面配置 {m,n} 这样的正则规则的时候,条件必须加上双引号,否则总是报错无法通过,官方文档里面真是很难找到这些东西,很晕。

37 thoughts on “Nginx和Lighttpd的Rewrite差别”

  1. 不错,Michael这个经验值得分享,虽然我用Nginx和Lighttp不多,呵呵,我绝大部分服务器还是Apache,一直担心某些功能在这些新的服务器上无法满足,还有稳定性也是我作为核心服务器的一个最大需求。正考虑是否在核心服务上也使用Nginx和lighttpd,不知michael有什么高见。

  2. [Comment ID #29689 Will Be Quoted Here]

    放心使用吧,youtube使用的是lighttpd,毫无问题,国内外若干网站使用着,Nginx经过实际测试,不会比lighttpd差,都可以放心使用,从我的经验来看,都比apache好使 🙂 也许是因为我对apache 掌握不够透彻才有此片面的看法。

  3. Heya exceptional blog! Does running a blog such as this
    take a great deal of work? I’ve virtually no expertise
    in computer programming but I was hoping to start my own blog in the near future.

    Anyway, should you have any suggestions or techniques for new blog owners
    please share. I know this is off subject nevertheless I simply wanted to ask.

  4. Hi there this is kinda of off topic but I was wanting to know if
    blogs use WYSIWYG editors or if you have to manually code with HTML.

    I’m starting a blog soon but have no coding expertise so I wanted to get guidance from someone
    with experience. Any help would be greatly appreciated!

  5. My developer is trying to persuade me to move to .net from
    PHP. I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using Movable-type on numerous websites for
    about a year and am anxious about switching to another platform.
    I have heard good things about Is there a way
    I can transfer all my wordpress posts into it?

    Any help would be really appreciated!

  6. I was wondering if you ever thought of changing the structure of your website?
    Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could
    connect with it better. Youve got an awful lot of text for only having one or two pictures.
    Maybe you could space it out better?

  7. Wonderful goods from you, man. I have understand your stuff previous to and you’re
    just too magnificent. I really like what you have acquired
    here, certainly like what you are stating and the
    way in which you say it. You make it enjoyable and you still care for to keep it wise.
    I cant wait to read much more from you. This is really a tremendous website.

  8. We absolutely love your blog and find most of your post’s to be exactly I’m looking for.

    can you offer guest writers to write content to suit your
    needs? I wouldn’t mind creating a post or elaborating on most of the subjects you write related to here.
    Again, awesome blog!

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image