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.