存档

  • 烂笔头|RewriteCond 重写规则执行条件

    RewriteCond 重写规则执行条件 语法: RewriteCond TestString CondPattern 生效域: server config, virtual host, directory, .htaccess 特别的上面的 TestString, 可提供反向引用. 引用模式为: %N 其中N为(0

    2010年1月25日 | 归档于 建站代码
  • Apache-rewrite模块重写相关的参数说明

    Apache mod_rewrite规则重写的标志一览 R[=code](force redirect) 强制外部重定向 强制在替代字符串加上http://thishost[:thisport]/前缀重定向到外部的URL.如果code不指定,将用缺省的302 HTTP状态码。 F(force URL to be forbidden)禁用URL,返回403HTTP状态码。 G(force URL to be gone) 强制URL为GONE,返回410HTTP状态码。 P(force proxy) 强制使用代理转发。 L(last rule) 表明当前规则是最后一条规则,停止分析以后规则的重写。 N(next round) 重新从第一条规则开始运行重写过程。 C(chained with next rule) 与下一条规则关联 如果规则匹配则正常处理,该标志无效,如果不匹配,那么下面所有关联的规则都跳过。 T=MIME-type(force MIME type) 强制MIME类型 NS (used only if no internal sub-request) 只用于不是内部子请求 NC(no case) 不区分大小写 QSA(query string append) 追加请求字符串 NE(no URI escaping [...]

    2008年11月21日 | 归档于 LAMP主机
  • Nginx重定向[Rewrite]配置 for wordpress & Discuz

    首先Apache的Rewite规则差别不是很大,但是Nginx的Rewrite规则比Apache的简单灵活多了 Nginx可以用if进行条件匹配,语法规则类似C if ($http_user_agent ~ MSIE) { rewrite ^(.*)$ /msie/$1 break; } 官方文档请点击这里

    2008年8月6日 | 归档于 建站代码
  • Drupal Rewrite for IIS 规则

    某人今天叫我找的Druapl 的IIS rewreite规则记在这里一下 Debug 0 Reload 5000 #Browse LOT #RewriteRule ^/(.*) /index.php RewriteRule ^/index.php\?q\=(.*)$ /index.php?q=$1 [l] RewriteRule ^/themes/(.*)$ /themes/$1 [l] RewriteRule ^/misc/(.*)$ /misc/$1 [l] RewriteRule ^/css/(.*)$ /css/$1 [l] RewriteRule ^/files/(.*)$ /files/$1 [l] RewriteRule ^/images/(.*)$ /images/$1 [l]

    2008年7月8日 | 归档于 建站代码
文章标签 ‘Rewrite’