【问题标题】:Mod_rewrite not send 301 but rather but 200 insteadMod_rewrite 不是发送 301 而是发送 200
【发布时间】:2013-08-23 09:41:23
【问题描述】:

我目前有一个类似“RewriteRule ^/?File.zip$ index.php?r=package/latest [L]”的模组重写设置

很遗憾,访问 File.zip 的客户端不能或不会遵循重定向。有什么方法可以告诉 mod_rewrite 不要重写 url,而是通过并从我的 php 脚本中获取内容?提前致谢!

【问题讨论】:

    标签: mod-rewrite


    【解决方案1】:

    是的,你可以。通过使用RewriteCond不等于感叹号

    例子

    RewriteCond %{REQUEST_URI} !^smth-you-want-to-exclude$

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-18
      • 2012-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多