Steve Church
Steve Church

Reputation: 344

.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.

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]

Upvotes: 0

Views: 3617

Answers (1)

ziollek
ziollek

Reputation: 1993

you have typo, replace:

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

with

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

Upvotes: 3

Related Questions