301 Redirect

2022-11-23 Thread davidcapital
383 / 5.000 Resultados de tradução Hello, I would like to know the code to redirect a subdomain to mobile, could anyone help me? ex:RewriteCond %{HTTP_USER_AGENT} "ipod|iphone|ipad|android|palm" [NC] RewriteRule (.*) http://m.yoursite.com.br/[R=301,L] This one I used in .htaccess in openlitesp

Re: nginx returns html instead of json response

2022-11-23 Thread Francis Daly
On Wed, Nov 23, 2022 at 11:27:35PM +0530, Kaushal Shriyan wrote: > On Wed, Nov 23, 2022 at 11:20 PM Francis Daly wrote: Hi there, > I am not sure about this line error_page 555 /dummyfile; what does 555 > code mean and what will be the contents of dummyfile? > > location ^~ /apis/ { >

Re: nginx returns html instead of json response

2022-11-23 Thread Kaushal Shriyan
On Wed, Nov 23, 2022 at 11:20 PM Francis Daly wrote: > On Tue, Nov 22, 2022 at 07:52:41PM +0530, Kaushal Shriyan wrote: > > Hi there, > > > map $sent_http_content_type $enableerror { > > defaulton; > > application/json off; > > } > > I believe that from a timi

Re: nginx returns html instead of json response

2022-11-23 Thread Kaushal Shriyan
On Tue, Nov 22, 2022 at 7:52 PM Kaushal Shriyan wrote: > Hi Francis, > > I tried the below to handle JSON responses from the PHP-FPM backend. > > *Line no from 1 to 4(*nginxtest.conf*)* > map $sent_http_content_type $enableerror { > defaulton; > application/json

Re: nginx returns html instead of json response

2022-11-23 Thread Francis Daly
On Tue, Nov 22, 2022 at 07:52:41PM +0530, Kaushal Shriyan wrote: Hi there, > map $sent_http_content_type $enableerror { > defaulton; > application/json off; > } I believe that from a timing point of view, that variable is not going to have a useful value when