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

oscaretu . oscaretu at gmail.com
Tue Jul 7 07:21:01 UTC 2015


You should protect the URL with single quotes, to avoid the interpretation
of character ! by the shell:

curl -A iPad -i 'https://www.domain.com/#!/pt/--item-view/pt/32081/Mix-J'

But if you put the URL
https://www.domain.com/#!/pt/--item-view/pt/32081/Mix-J in a browser (at
least in Firefox), the browser sends to the web server only the first part
of that URL:

    https://www.domain.com/

because the character # is a special one.

Surprisingly, curl sends the full URL to the webserver.

Greetings,

Oscar


On Sun, Jul 5, 2015 at 9:31 PM, ramsoft75 <nginx-forum at nginx.us> wrote:

> Hi there
>
> I changed to
>
> #to detect if the device with www entered in domain is mobile
> if ($http_user_agent ~* '(iPhone|iPod|iPad|Android|BlackBerry|webOS|Windows
> Phone)') {
> rewrite ^ http://m.domain.com$request_uri;
> }
>
> I executed the command :
>
> $ curl -A iPad -i https://www.domain.com/#!/pt/--item-view/pt/32081/Mix-J
>
> And the result was :
>
> -bash: !/pt/--item-view/pt/32081/Mix-J: event not found
>
> This only append's with Safari, there's no problem with Chrome (Desktop,
> Mobile) or Internet Explorer in Pc, could this be a browser problem and not
> an Nginx configuration problem ?
>
> Thanks
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,260033,260064#msg-260064
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
Oscar Fernandez Sierra
oscaretu at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150707/520f16b8/attachment-0001.html>


More information about the nginx mailing list