【问题标题】:Apache mod_rewrite, RewriteCond issueApache mod_rewrite,RewriteCond 问题
【发布时间】:2012-04-03 17:00:42
【问题描述】:

在这个问题上:mod rewrite to remove file extension, add trailing slash, remove www and redirect to 404 if no file/directory is available

在解决方案中我看到了这个:
RewriteCond %{DOCUMENT_ROOT}/$1.php -f

你能解释一下$1在这里是什么意思吗???

(如果题名不合适,请改一下,谢谢。)

【问题讨论】:

    标签: php apache mod-rewrite


    【解决方案1】:

    $1 是先前在RewriteRule 语句中指定的第一个捕获的正则表达式的结果。

    查看官方文档:http://httpd.apache.org/docs/current/mod/mod_rewrite.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-20
      • 2012-02-16
      • 2015-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多