【问题标题】:.htaccess RewriteCond: bad flag delimiters.htaccess RewriteCond:错误的标志分隔符
【发布时间】:2014-02-27 08:58:13
【问题描述】:

我的 .htaccess 文件中有此规则,但由于某种原因,我收到带有 Bag Flag Delimiters 消息的 501 服务器错误。

RewriteEngine On

RewriteRule ^(blog|deblog|plblog)$ /$0 [L]
RewriteCond %{HTTP_HOST} ^www\.example\.de [NC]
RewriteCond %{REQUEST_URI} !^/index\.(php|html) [NC]
RewriteCond %{REQUEST_URI} !^/$ {NC]
RewriteRule ^.*$ http://www.example.de/de/$0 [R=301,L]

【问题讨论】:

  • 错字? { -> [ 在第 6 行

标签: php apache .htaccess mod-rewrite


【解决方案1】:

你有错别字,替换:

RewriteCond %{REQUEST_URI} !^/$  {NC]

RewriteCond %{REQUEST_URI} !^/$  [NC]

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-10-24
    • 2016-07-13
    • 1970-01-01
    • 1970-01-01
    • 2015-02-04
    • 2014-06-23
    • 2014-12-21
    • 2017-10-04
    相关资源
    最近更新 更多