.htaccess RewriteCond:坏旗分隔符

时间:2014-02-27 08:58:14

标签: php apache .htaccess mod-rewrite

我的.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]

1 个答案:

答案 0 :(得分:3)

你有拼写错误,替换:

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

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