Avoiding loop in mod_rewrite

software development

#1

Hi All,
Can you pls help me to understand this, why mod_rewrite puts me in loop “three times”?
it redirects url three times, and it works in the first time but how can I avoid the loop? Thanks much.

Options +FollowSymlinks
RewriteBase /

RewriteEngine on
##############################
#Prevent Files image/file hotlinking and bandwidth stealing
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www.)?bbb.example.com($|/) [NC]
RewriteRule .(gif|jpg|jpeg|png|mp3|mpg|avi|mov)$ - [F,NC]

RewriteRule ^$ /index.php [QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/www/
RewriteRule ^(.)$ /index.php/$1 [QSA,NC,L]
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .
- [L]