Welcome! Log In Create A New Profile

Advanced

IE6 redirect

Posted by terrani 
IE6 redirect
October 27, 2011 07:20PM
Hi,

I'm trying to detect users' browser version then proxy to a certain page.

I've read http://wiki.nginx.org/HttpBrowserModule#Examples and came up with the following configuration

server {

listen 83;
server_name {my ip goes here}


location / {

ancient_browser "MSIE 6.0";

if ($ancient_browser){
rewrite ^ /ie6 break;
}

proxy_pass http://localhost:34881 ;

proxy_set_header Host $host ;
proxy_set_header X-Real-IP $remote_addr ;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
proxy_set_header Country $geoip_country_code;

proxy_cache cache;
proxy_cache_valid 200 302 1h;
proxy_cache_valid 404 1m;
add_header Pragma no-cache;
expires epoch;
if_modified_since off;
add_header Last-Modified "";
}

The problem with this code is that I get an infinity loop.

How do I display http://localhost:34881/ie6 if a user is using ie6 ?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 161
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready