seon.ds
By:
seon.ds

How to resolve ERR_TOO_MANY_REDIRECTS

March 18, 2014 22.1k views
Hello to everyone. Sorry for my English. I'm trying to solve ERR_TOO_MANY_REDIRECTS that I get on my droplet. I have CentOS 6.5 32bit, Apache 2.2.15, PHP 5.4.26, MySQL, phpMyAdmin 4.1.9. And there is .htacces from site directory: AddDefaultCharset UTF-8 Options +SymLinksIfOwnerMatch Options -Indexes RewriteEngine on # RewriteCond %{HTTP_HOST} ^www.site.com$ [NC] # RewriteRule ^(.*)$ http://site.com/$1 [L,R=301] #apache2ctl -M && sudo a2enmod expires && sudo service apache2 restart (to enable mod_expires on ubuntu) ExpiresActive On ExpiresDefault "access 7 days" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/x-icon "access 1 year" ExpiresByType application/x-shockwave-flash "access 1 year" ExpiresByType application/javascript "access 1 year" ExpiresByType application/x-javascript "access 1 year" ExpiresByType text/css "access 1 year" ExpiresByType text/html "access 1 year" RewriteRule ^(.*)\.tpl$ [R=404] RewriteRule ^(.*)\.zip$ [R=404] RewriteCond $1 !^(index\.php|user_guide|uploads/.*|favicon\.ico|docs|favicon\.png|captcha/.*|application/modules/.*/templates|application/mod$RewriteRule ^(.*)$ /index.php/$1 [L] #################################### # or RewriteRule ^(.+)$ index.php?$1 [L] # or # RewriteRule ^(.*)$ /index.php?/$1 [L,QSA] Who can help me ?
1 Answer
You basically have a redirect rule that keeps running and therefore generating too many/infinite redirections.

Let's start from scratch, what do you want to accomplish with your rewrite rules?
Have another answer? Share your knowledge.