Re: RE: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread figshta
Reinis, Thank you so much for all your help! I have succeeded in getting things set up for now. I couldn't have done it with out you guys. I have learned a lot form you and Francis and I am very grateful. Thank you for being patient with my ignorance. Sorry to both of you for wasting your time

Re: Redirect Question for Directory Structure Change

2020-09-10 Thread J.R.
You really should use a custom named capture group as the default "$1" (and $2, $3, $4...) can cause erroneous output if there is any other capturing going on in your configuration files... i.e. location ~ ^/e/(?.*) { return 301 /$x1$is_args$args; } As someone else mentioned, be

Re: RE: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread figshta
>You should clean cache (or set to never cache) for each testing session/config change as browsers tend to cache the redirects very heavily (especially for static content). >A better way as Francis suggested is to use a curl or other tools (like wget -S ..) which don't cache anything and you'll al

RE: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread Reinis Rozitis
> Please bear with me... > It seems that I'm getting different results than I described earlier... > > In fact it is now working for the most part... > The errors are limited to certain files in Chrome on the Mac, but not in > Safari > or Firefox. You should clean cache (or set to never cache) f

Re: RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread figshta
Thank you Reinis! Please bear with me... It seems that I'm getting different results than I described earlier... In fact it is now working for the most part... The errors are limited to certain files in Chrome on the Mac, but not in Safari or Firefox. >What do you mean by "got deeper" can you g

RE: RE: Redirect Question for Directory Structure Change

2020-09-10 Thread Reinis Rozitis
> I was wrong... > > >This seems to work: > >>rewrite ^/e/(.*) /$1 permanent; > > It only works for the first level... > 'threedaystubble.com/Gallery.html' works but other links from that page that > got deeper into the file structure do not! What do you mean by "got deeper" can you give a sampl

Re: RE: Redirect Question for Directory Structure Change

2020-09-09 Thread figshta
I was wrong... >This seems to work: >>rewrite ^/e/(.*) /$1 permanent; It only works for the first level... 'threedaystubble.com/Gallery.html' works but other links from that page that got deeper into the file structure do not! So, maybe map directive is needed after all... I'm planing to try

Re: RE: Redirect Question for Directory Structure Change

2020-09-09 Thread figshta
Thank you Reinis. I really appreciate your help and your patience. I am trying to learn this, so seeing what how it works is very useful. To be clear, hopefully, I need all the (multiple) subdirectories of threedaystubble.com/e/ in existing inbound links to refer to the new structure threedaystub

RE: Redirect Question for Directory Structure Change

2020-09-09 Thread Reinis Rozitis
It is a bit unclear if you want only a single rewrite or are there multiple different directory mappings/redirects. > I tried a couple of ideas, but they didn't work, I thought this location > directive > inside a server block was best, but it didn't work. > > location = /e { >return 31

Redirect Question for Directory Structure Change

2020-09-09 Thread figshta
I'm looking for help with a permanent site-wide redirect. I have a website that I moved to a new server. For some crazy reason the old server had an odd structure that I am changing. The URL root for the old site is http://threedaystubble.com/e/ I have changed it to be http://threedaystubble.com

Re: Redirect question

2018-03-23 Thread Friscia, Michael
Great, thank you for that explanation, I do happen to have hundreds. ___ Michael Friscia Office of Communications Yale School of Medicine (203) 737-7932 - office (203) 931-5381 - mobile http://web.yale.edu On 3/23/18, 11:37 AM, "ngi

Re: Redirect question

2018-03-23 Thread Igor Sysoev
> On 23 Mar 2018, at 18:22, Friscia, Michael wrote: > > Ok, that worked out really well. > > For anyone following I had to go here > https://forum.nginx.org/read.php?2,279172,279176#msg-279176 > because our exchange server destroyed the sample URLs. > > But I’m not sure how the location order

Re: Redirect question

2018-03-23 Thread Friscia, Michael
Ok, that worked out really well. For anyone following I had to go here https://forum.nginx.org/read.php?2,279172,279176#msg-279176 because our exchange server destroyed the sample URLs. But I’m not sure how the location order is mitigated. Is this because the first location match is a regex in

Re: Redirect question

2018-03-23 Thread Igor Sysoev
> On 23 Mar 2018, at 16:14, Friscia, Michael wrote: > > I’m wondering how to achieve this in the config > > I have a url like this > http://example.com/people/mike > > and I want to redirect to > https://www.othersite.com/users/mike > > the problem at hand is switching “/people/” to “/use

Redirect question

2018-03-23 Thread Friscia, Michael
I’m wondering how to achieve this in the config I have a url like this http://example.com/people/mike and I want to redirect to https://www.othersite.com/users/mike the problem at hand is switching “/people/” to “/users/” but keep everything else so if I was to have http://example.com/people/mi

Re: redirect question (inception inside)

2014-08-16 Thread Ronald Van Assche
YEP thank you : > The matching is performed against a normalized URI, after decoding the text > encoded in the “%XX” form, resolving references to relative path components > “.” and “..”, and possible compression of two or more adjacent slashes into a > single slash. so i do not have to put //

Re: redirect question (inception inside)

2014-08-16 Thread Edho Arief
On Aug 16, 2014 6:22 PM, "Ronald Van Assche" wrote: > > NICE : it works > > more complicated one : > > /ue//ue/data/filename => /ue/data/filenam > there is 2 / in the URL. > > location ^~ /ue//ue/ { > rewrite ^/ue(/ue/.*) $1 permanent; > } > > does not work :o( > > try re

Re: redirect question (inception inside)

2014-08-16 Thread Ronald Van Assche
NICE : it works more complicated one : /ue//ue/data/filename => /ue/data/filenam there is 2 / in the URL. location ^~ /ue//ue/ { rewrite ^/ue(/ue/.*) $1 permanent; } does not work :o( Le 16 août 2014 à 10:52, Edho Arief a écrit : >> > location ^~ /us/us/ { > rewr

Re: redirect question (inception inside)

2014-08-16 Thread Edho Arief
On Sat, Aug 16, 2014 at 5:27 PM, Ronald Van Assche wrote: > I want to redirect /us/us/directory/filename to the /us/directory/filename > directory on my Nginx server. > > but this > > if ( $request_filename ~ /us/us/.+ ) { > rewrite ^(.*) http://mysiteurlt/us/$1 permanent;

Re: redirect question (inception inside)

2014-08-16 Thread itpp2012
Shouldn't the /us/ be removed in the rewrite? what does the logfile say where it is trying to locate to? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252606,252607#msg-252607 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/m

redirect question (inception inside)

2014-08-16 Thread Ronald Van Assche
I want to redirect /us/us/directory/filename to the /us/directory/filename directory on my Nginx server. but this if ( $request_filename ~ /us/us/.+ ) { rewrite ^(.*) http://mysiteurlt/us/$1 permanent; } wont work. How can i redirect or rewrite such url ? _