Re: 301 Redirect

2022-11-24 Thread Sergey A. Osokin
Hi there, On Wed, Nov 23, 2022 at 08:38:27PM -0500, davidcapital wrote: > 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=30

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: Force 302 to 301 redirect

2020-01-11 Thread Francis Daly
On Sat, Jan 11, 2020 at 08:35:02AM -0500, tconlon wrote: Hi there, > Found it, > > if ($page == 'index.php') { > header("Location: ". $toUrl); > > probably need something like this > > // 301 Moved Permanently > header("Location: ",TRUE,301); Good that you have found a straightfor

Re: Force 302 to 301 redirect

2020-01-11 Thread tconlon
Hi, Found it, if ($page == 'index.php') { header("Location: ". $toUrl); probably need something like this https://forum.nginx.org/read.php?2,286700,286708#msg-286708 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/l

Re: Force 302 to 301 redirect

2020-01-11 Thread tconlon
Hi, Digging into the code will get back to you Thanks Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286700,286707#msg-286707 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Force 302 to 301 redirect

2020-01-10 Thread Francis Daly
On Fri, Jan 10, 2020 at 03:17:21PM -0500, tconlon wrote: Hi there, > Absolutely..and thanks > > Running this on Forge / Digital Ocean I think you indicated that your index.php takes id=235 and decides that it will return a redirect to https://myurl/location/newyorkcity Does *that* php code say

Re: Force 302 to 301 redirect

2020-01-10 Thread tconlon
Absolutely..and thanks Running this on Forge / Digital Ocean www.myurl.com # FORGE CONFIG (DO NOT REMOVE!) include forge-conf/www.myurl.com/before/*; server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.myurl.com; root /home/forge/www.myurl.com/c

Re: Force 302 to 301 redirect

2020-01-10 Thread cooley.j...@gmail.com
Can you share the relevant parts of your config? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286700,286701#msg-286701 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Force 302 to 301 redirect

2020-01-10 Thread tconlon
Hi Team, I have a funny situation that I can't seem to get around. Here are the details. We had this naming convention to indicate a specific location: https://myurl/location/index.php?id=235 This naming convention is still out in the internet ether We changed to go to a slug based operation:

Re: A fatal 301 redirect...

2018-09-17 Thread Pierre Couderc
On 09/18/2018 02:55 AM, Maxim Dounin wrote: Hello! On Tue, Sep 18, 2018 at 12:10:22AM +0200, Pierre Couderc wrote: I did use wrongly a 301 redirect I have corrected now, but the redirect remains. I In no particular order: - There are no log lines in the access log coresponding to the

Re: A fatal 301 redirect...

2018-09-17 Thread Maxim Dounin
Hello! On Tue, Sep 18, 2018 at 12:10:22AM +0200, Pierre Couderc wrote: > I did use wrongly a 301 redirect > > I have corrected now, but the redirect remains. > > I use wget : > > nous@pcouderc:~$ wget https://www.ppp.fr > --2018-09-17 23:52:44--  https://www.ppp.fr

Re: A fatal 301 redirect...

2018-09-17 Thread Jeff Dyke
test.ppp.fr; return 301 https://$server_name$request_uri; } Best, jeff On Mon, Sep 17, 2018 at 6:10 PM Pierre Couderc wrote: > I did use wrongly a 301 redirect > > I have corrected now, but the redirect remains. > > I use wget : > > nous@pcouderc:~$ wget https://www.ppp

A fatal 301 redirect...

2018-09-17 Thread Pierre Couderc
I did use wrongly a 301 redirect I have corrected now, but the redirect remains. I use wget : nous@pcouderc:~$ wget https://www.ppp.fr --2018-09-17 23:52:44--  https://www.ppp.fr/ Resolving www.ppp.fr (www.ppp.fr)... 2a01:e34:eeaf:c5f0::fee6:854e, 78.234.252.95 Connecting to www.ppp.fr

Re: nginx sends 301 redirect for alias in location

2018-09-05 Thread Peter Volkov
On Wed, Sep 5, 2018 at 3:25 PM, Maxim Dounin wrote: > On Wed, Sep 05, 2018 at 09:58:54AM +0300, Peter Volkov wrote: > > > Hi. Could you, please, explain. Why nginx sends 301 redirect for the > > following vhost: > > > > server { > > listen 80; >

Re: nginx sends 301 redirect for alias in location

2018-09-05 Thread Maxim Dounin
Hello! On Wed, Sep 05, 2018 at 09:58:54AM +0300, Peter Volkov wrote: > Hi. Could you, please, explain. Why nginx sends 301 redirect for the > following vhost: > > server { > listen 80; > server_name test.domain.tv <http://test.m9.smotreshka.tv>;

nginx sends 301 redirect for alias in location

2018-09-04 Thread Peter Volkov
Hi. Could you, please, explain. Why nginx sends 301 redirect for the following vhost: server { listen 80; server_name test.domain.tv <http://test.m9.smotreshka.tv>; access_log off; location = /test/README.txt { alias /var/www/; } } Here is redirect: $ htt

Re: 301 Redirect from www version to non www.

2018-03-23 Thread Jeff Dyke
A couple things here guess. Is 80 even open in the firewall? Also could cloudflare be picking up 80 and redirecting to https, also this won't solve your problem, but having a server name prefixed with https is not valid, it may pass a configtest, but not sure that it would every match. On Fri, Ma

301 Redirect from www version to non www.

2018-03-23 Thread lichandro
Hello I have to redirect my whole traffic to the non www version of my website. I have the http2 SSL free form cloudflare. I did this in my .conf file and It doesn't work. server { listen 80; server_name www.kasacja-aut.pl kasacja-aut.pl https://www.kasacja-aut.pl; return 301 https://

302 301 redirect custom HTML content

2017-03-23 Thread Eugene Piatenko
Hello! I'm trying to 1. send people to home page if they enter wrong place (404) 2. it works, but HTML content with headers is: HTTP/1.1 302 Moved Temporarily Server: nginx/1.10.3 Date: Thu, 23 Mar 2017 11:38:08 GMT Content-Type: text/html Content-Length: 161 Location: http://mysite/myhomepage.ht

Re: disable 301 redirect for directory / use relative redirect / change scheme

2016-12-22 Thread Ruslan Ermilov
a is a directory, > so nginx send back a 301 redirect with "Location: http://exemple.com/aaa/"; > > Is it possible to send https instead of http (in Location), > or send a relative header, like "Location: /aaa/", > or just disable this redirection (in my c

Re: Why is nginx returning a 301 redirect in my reverse-proxy to a REST service?

2016-03-25 Thread JoakimR
Hi I'm pretty new in NginX but the directives suggest you add proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; to your config http://nginx.org/en/docs/http/ngx_http_proxy_module.html Posted at Nginx Forum: https://forum.nginx.org/read.php?2,265660,265664#msg-265664

Why is nginx returning a 301 redirect in my reverse-proxy to a REST service?

2016-03-25 Thread Rowland Smith
I have a REST service with an endpoint ‘registrations' running in a Docker container and it maps port 5000 to port 5001 on the Docker host. My /etc/nginx/conf.d/default.conf contains: upstream registration-api { server registration:5001 ; } server { listen 80; server_name ""

Re: disable 301 redirect for directory / use relative redirect / change scheme

2015-08-26 Thread biazus
Please try something like that: proxy_redirect http://$proxy_host/ $scheme://$host/; Regards, Biazus Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261275,261283#msg-261283 ___ nginx mailing list nginx@nginx.org http://mailman.ngin

Re: disable 301 redirect for directory / use relative redirect / change scheme

2015-08-26 Thread Etienne Champetier
> Hi, > >> > > >> > I have this setup > >> > browser -> ssl proxy -> nginx > >> > browser to ssl proxy is https only > >> > ssl proxy to nginx is http only > >> > > >> > now i browse to "https://exemp

Re: disable 301 redirect for directory / use relative redirect / change scheme

2015-08-26 Thread Edho Arief
sl proxy -> nginx >> > browser to ssl proxy is https only >> > ssl proxy to nginx is http only >> > >> > now i browse to "https://exemple.com/aaa";, where aaa is a directory, >> > so nginx send back a 301 redirect with "Location: >>

Re: disable 301 redirect for directory / use relative redirect / change scheme

2015-08-26 Thread Payam Chychi
a is a directory, so nginx send back a 301 redirect with "Location: http://exemple.com/aaa/"; Is it possible to send https instead of http (in Location), or send a relative header, like "Location: /aaa/", or just disable this redirection (in my case it's ok) see i

Re: disable 301 redirect for directory / use relative redirect / change scheme

2015-08-26 Thread Etienne Champetier
> > > > now i browse to "https://exemple.com/aaa";, where aaa is a directory, > > so nginx send back a 301 redirect with "Location: > http://exemple.com/aaa/"; > > > > Is it possible to send https instead of http (in Location), > >

Re: disable 301 redirect for directory / use relative redirect / change scheme

2015-08-26 Thread Edho Arief
On Thu, Aug 27, 2015 at 12:30 AM, Etienne Champetier wrote: > Hi, > > I have this setup > browser -> ssl proxy -> nginx > browser to ssl proxy is https only > ssl proxy to nginx is http only > > now i browse to "https://exemple.com/aaa";, where aaa is

disable 301 redirect for directory / use relative redirect / change scheme

2015-08-26 Thread Etienne Champetier
Hi, I have this setup browser -> ssl proxy -> nginx browser to ssl proxy is https only ssl proxy to nginx is http only now i browse to "https://exemple.com/aaa";, where aaa is a directory, so nginx send back a 301 redirect with "Location: http://exemple.com/aaa/"; Is

Re: 301 redirect

2015-02-14 Thread JACK LINKERS
Ok, thanks ! 2015-02-14 23:37 GMT+01:00 Francis Daly : > On Sat, Feb 14, 2015 at 11:30:19PM +0100, JACK LINKERS wrote: > > Hi there, > > > Thanks for your input. What would be the best ways doing it then ? > > (I forgot to mention there is a large amount of URLs : +/- 20) > > A bunch of lines lik

Re: 301 redirect

2015-02-14 Thread Francis Daly
On Sat, Feb 14, 2015 at 11:30:19PM +0100, JACK LINKERS wrote: Hi there, > Thanks for your input. What would be the best ways doing it then ? > (I forgot to mention there is a large amount of URLs : +/- 20) A bunch of lines like location = /oldname.html { return 301 /newname.html; } (It's the

Re: 301 redirect

2015-02-14 Thread JACK LINKERS
Hi Francis, Thanks for your input. What would be the best ways doing it then ? (I forgot to mention there is a large amount of URLs : +/- 20) Is this a good way ? : map $old $new { oldlink.html newlink.com oldink2.html newlink2.html } location $old { return 301 $scheme://$host$new; } If

Re: 301 redirect

2015-02-14 Thread Francis Daly
On Sat, Feb 14, 2015 at 10:57:26PM +0100, JACK LINKERS wrote: > But how do I redirect URLs that have been changed ? > ie. https://mywebsite.com/oldname.html to https://mywebsite.com/newname.html location = /oldname.html { return 301 /newname.html; } > I did try > >if ( $request_filename ~ o

Re: 301 redirect

2015-02-14 Thread Ian
On 14/02/2015 21:57, JACK LINKERS wrote: Hello, I need to redirect some URLs after redesigning my website. I use a 301 redirect for HTTP to HTTPS protocole : if ($scheme = "http") { return 301 https://$server_name$request_uri; } But how do I redirect URLs that have been changed ?

301 redirect

2015-02-14 Thread JACK LINKERS
Hello, I need to redirect some URLs after redesigning my website. I use a 301 redirect for HTTP to HTTPS protocole : if ($scheme = "http") { return 301 https://$server_name$request_uri; } But how do I redirect URLs that have been changed ? ie. https://mywebsite.com/oldname.htm

Re: Query strings duplicating on 301 redirect

2014-05-05 Thread Justin Dorfman
@Richard Interesting. I shall give that a try. Regards, Justin Dorfman Director of Developer Relations MaxCDN Email / IM: jdorf...@maxcdn.com Mobile: 818.485.1458 Twitter: @jdorfman On M

Re: Query strings duplicating on 301 redirect

2014-05-05 Thread Richard Stanway
Just a note, I think the preferred way to do this is with "return". It's much simpler (no rewrite / PCRE overhead): location / { if ($scheme = http) { return 301 https://$http_host$request_uri; } On Mon, May 5, 2014 at 10:54 PM, Justin Dorfman wrote: > Thanks Francis, worked perfectly. > > > R

Re: Query strings duplicating on 301 redirect

2014-05-05 Thread Justin Dorfman
Thanks Francis, worked perfectly. Regards, Justin Dorfman Director of Developer Relations MaxCDN Email / IM: jdorf...@maxcdn.com Mobile: 818.485.1458 Twitter: @jdorfman On Mon, May 5, 201

Re: Query strings duplicating on 301 redirect

2014-05-05 Thread Francis Daly
On Mon, May 05, 2014 at 12:14:48PM -0700, Justin Dorfman wrote: Hi there, > I am trying to redirect (301) all HTTP request to TLS (HTTPS) and I keep > getting duplicate query strings added to the uri. e.g.: http://nginx.org/r/rewrite Second last paragraph looks like it should fix it. f

Query strings duplicating on 301 redirect

2014-05-05 Thread Justin Dorfman
Hey All, I am trying to redirect (301) all HTTP request to TLS (HTTPS) and I keep getting duplicate query strings added to the uri. e.g.: curl -I "http://foo.bar.example.com/foobar.css?v=2"; HTTP/1.1 301 Moved Permanently [clipped] Location: http://foo.bar.example.com/foobar.css?v=2?v=2 Nginx co

Re: nginx reverse proxy odd 301 redirect

2013-10-06 Thread izghitu
Hi, The problem was hostname related. Thanks for your help > incorrect configuration of server{} blocks and/or wrong hostname > used in request. > Posted at Nginx Forum: http://forum.nginx.org/read.php?2,243458,243466#msg-243466 ___ nginx mailing l

Re: nginx reverse proxy odd 301 redirect

2013-10-06 Thread Maxim Dounin
n at the point where I press the submit > button and the POST should happen, I can't see the POST hitting the apache > backend(no entry in access log) but I can see an odd 301 redirect with the > POST request to the script in the nginx access log. > > Any idea of what

nginx reverse proxy odd 301 redirect

2013-10-05 Thread izghitu
use apache directly then the change password script works fine. If I do it using nginx as reverse proxy then at the point where I press the submit button and the POST should happen, I can't see the POST hitting the apache backend(no entry in access log) but I can see an odd 301 redirect wit