Redirect Mobile Users to

yaronycity nginx-forum at
Mon Aug 6 21:45:43 UTC 2012

I have changed it this, and it still does not work:(

server {
  root /home/nginx/domains/;
  root /home/nginx/domains/;

  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/(.*)$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;

Posted at Nginx Forum:,229364,229367#msg-229367

More information about the nginx mailing list