Welcome! Log In Create A New Profile

Advanced

Rewrite PHP block older browsers

This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
August 08, 2012 07:24AM
I have the following config file that works for everything but PHP pages.

I am trying to get everything as an ancient_browser to add /IE/ in the URL. Essentially changing the root for these clients although you cannot set this within an if. This is working for anything not .php and loads the content silently from the /IE/ content.

If I add the rewrite within the PHP location it doesn't work either. Any ideas?

location / {
if ($ancient_browser) {
rewrite ^(.*)$ /IE/$1 break;
}
try_files $uri $uri/ /index.php;
}


location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
if (-f $request_filename) {
fastcgi_pass 127.0.0.1:9000;
}
}
Subject Author Posted

Rewrite PHP block older browsers

leeus August 08, 2012 07:24AM



Online Users

Guests: 87
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready