Add another rewrite condition that checks if redirection has already taken place
## Language Detection
#The 'Accept-Language' header starts with 'sv'
#and the test is case-insensitive ([NC])
RewriteCond %{HTTP:Accept-Language} ^sv [NC]
#If not already redirected
RewriteCond %{REQUEST_URI} !^/sv/ [NC] # ADDED
#Redirect user to /sv/hauptseite address
#sending 301 (Moved Permanently) HTTP status code
RewriteRule ^$ /sv/ [L,R=301]
#The 'Accept-Language' header starts with 'de'
#and the test is case-insensitive ([NC])
RewriteCond %{HTTP:Accept-Language} ^de [NC]
#If not already redirected
RewriteCond %{REQUEST_URI} !^/de/ [NC] # ADDED
#Redirect user to /de/hauptseite address
#sending 301 (Moved Permanently) HTTP status code
RewriteRule ^$ /de/ [L,R=301]
#For every other language (including English :)) use English
RewriteRule ^$ - [L] # MODIFIED