I'm working on a codeIgniter project with using MVC.
I need to detect Microsoft Internet Explorer (IE) agents and redirect them to another page in my localhost using .htaccess file. Then I tried something like this:
RewriteEngine on
RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
RewriteCond %{HTTP_USER_AGENT} "MSIE [6-8]" [NC]
RewriteRule .* http://localhost/secPay/doc [R]
But Unfortunately it does not work and gives error like below:
This webpage has a redirect loop
ERR_TOO_MANY_REDIRECTS
But it redirects to another servers like http
://www.example.com
But I need to redirect it to http
://localhost/secPay/doc
So what can I do? How to solve this?
[edited by: Ocean10000 at 3:58 pm (utc) on Jun 19, 2015]
[edit reason] examplified. [/edit]