htaccess中[QSA, L]中的L是什么 [英] What is L in [QSA, L] in htaccess

查看:34
本文介绍了htaccess中[QSA, L]中的L是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

QSA 意味着如果有一个查询字符串与原始 URL 一起传递,它将被附加到重写(olle?p=1 将被重写为index.php?url=olle&p=1.

QSA means that if there's a query string passed with the original URL, it will be appended to the rewrite (olle?p=1 will be rewritten as index.php?url=olle&p=1.

L 表示如果规则匹配,则不再处理下面的任何 RewriteRules这个.

L means if the rule matches, don't process any more RewriteRules below this one.

有什么简单的例子可以解释 L 的用法?我似乎无法理解上面的解释.任何帮助将不胜感激.谢谢.

Hi, what are some easy examples to explain the use of L? I can't seem to grasp this explanation above. Any help will be highly appreciated. Thanks.

推荐答案

.htaccess 标志列表

  • C(与下一条规则链接)
  • CO=cookie(设置指定的cookie)
  • E=var:value(将环境变量 var 设置为值)
  • F(禁止 - 向用户发送 403 标头)
  • G(消失 - 不再存在)
  • H=handler(设置处理程序)
  • L(最后 - 停止处理规则)
  • 最后一条规则:在处理完前面的指令后,指示服务器停止重写.

    Last rule: instructs the server to stop rewriting after the preceding directive is processed.

    • N(下一步 - 继续处理规则)
    • NC(不区分大小写)
    • NE(不要在输出中转义特殊的 URL 字符)
    • NS(如果请求是子请求,则忽略此规则)
    • P(代理 - 即,apache 应该获取替换部分中指定的远程内容并将其返回)
    • PT(直通 - 使用其他处理程序处理 URL 时使用,例如 mod_alias)
    • R(临时重定向到新网址)
    • R=301(永久重定向到新网址)
    • QSA(将请求中的查询字符串附加到替换的 URL)
    • S=x(跳过接下来的 x 条规则)
    • T=mime-type(强制指定 mime 类型)
    • 标志被添加到重写规则的末尾,以告诉 Apache 如何解释和处理规则.它们可用于告诉 apache 将规则视为不区分大小写,如果当前规则匹配,则停止处理规则,或各种其他选项.它们以逗号分隔,并包含在方括号中.

      Flags are added to the end of a rewrite rule to tell Apache how to interpret and handle the rule. They can be used to tell apache to treat the rule as case-insensitive, to stop processing rules if the current one matches, or a variety of other options. They are comma-separated, and contained in square brackets.

      这篇关于htaccess中[QSA, L]中的L是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆