简体   繁体   English

.htaccess RewriteCond:错误的标志分隔符

[英].htaccess RewriteCond: bad flag delimiters

I have this rule in my .htaccess file but for some reason I get a 501 server error with the Bag Flag Delimiters message. 我的.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]

you have typo, replace: 您有错别字,请替换:

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

with

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM