Welcome! Log In Create A New Profile

Advanced

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

July 06, 2015 04:52AM
Good day

There was a problem in testing in the terminal with the character "!", it should be with "\" after, like this :

$ curl -A iPad -i http://www.domain.com/#\!/pt/--item-view/en/3190/Wok-Vintage

And the result was :

HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Mon, 06 Jul 2015 08:50:10 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: http://m.domain.com/

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

And in this case i changed the nginx configuration to :

if ($http_user_agent ~* '(iPhone|iPod|iPad|Android|BlackBerry|webOS|Windows Phone)') {
rewrite ^/$ http://m.domain.com/$1 permanent;
}



Edited 1 time(s). Last edit at 07/06/2015 05:08AM by itpp2012.
Subject Author Posted

Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 03, 2015 07:04AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

Francis Daly July 03, 2015 01:48PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 04, 2015 02:03PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 04, 2015 02:20PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

Francis Daly July 04, 2015 02:36PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 05, 2015 03:31PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 06, 2015 04:52AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

Francis Daly July 06, 2015 08:24AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 06, 2015 10:10AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 06, 2015 10:11AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 06, 2015 12:39PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 06, 2015 12:40PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 06, 2015 12:57PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

Alt July 06, 2015 02:33PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

Francis Daly July 06, 2015 02:22PM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

oscaretu . July 07, 2015 03:22AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 07, 2015 05:28AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

Alt July 07, 2015 06:29AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

ramsoft75 July 07, 2015 10:44AM

Re: Nginx doesn't redirect www no m in Safari, iPhone, iPad

oscaretu . July 07, 2015 08:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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