Welcome! Log In Create A New Profile

Advanced

Re: Redirect Mobile Users to m.domain.com

August 06, 2012 05:45PM
I have changed it this, and it still does not work:(

server {
server_name domain.com www.domain.com;
root /home/nginx/domains/domain.com/public;

server_name m.domain.com www.m.domain.com;
root /home/nginx/domains/domain.com/public/m;

try_files $uri $uri/ /index.php;

location / {
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?$args;
}

location ^~ /m/ {
rewrite ^/m/(.*) http://m.domain.com/$1 permanent;
}


# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
}

include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
#include /usr/local/nginx/conf/errorpage.conf;

}
Subject Author Posted

Redirect Mobile Users to m.domain.com

yaronycity August 06, 2012 05:22PM

Re: Redirect Mobile Users to m.domain.com

Edho Arief August 06, 2012 05:36PM

Re: Redirect Mobile Users to m.domain.com

yaronycity August 06, 2012 05:45PM

Re: Redirect Mobile Users to m.domain.com

Edho Arief August 06, 2012 05:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 268
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