Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Daniel
Sorry didn't have Gmail synced! :-) El 27 jun. 2017 12:59 a. m., "Nigel Peck" escribió: > On 26/06/2017 17:58, Daniel wrote: > >> Nigel, either I misunderstood you but Redirect redirects everything after >> the matched part and appends the rest to the target >> > >

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Nigel Peck
On 26/06/2017 17:58, Daniel wrote: Nigel, either I misunderstood you but Redirect redirects everything after the matched part and appends the rest to the target Yes, agreed, it was by mistake, Daniel. See subsequent emails from Eric. Nigel

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Daniel
Nigel, either I misunderstood you but Redirect redirects everything after the matched part and appends the rest to the target So the first example does the same as the second, it was just missing a trailing slash. El 26 jun. 2017 11:58 p. m., "Nigel Peck" escribió: >

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Nigel Peck
On 26/06/2017 17:00, Eric Covener wrote: On Mon, Jun 26, 2017 at 5:58 PM, Nigel Peck wrote: They wouldn't redirect in the same way, but it would be the same type of redirect. Since the second one preserves the page on the site that it is redirecting, which is a very

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Eric Covener
On Mon, Jun 26, 2017 at 6:00 PM, Eric Covener wrote: > That's not correct. Redirect carries the URL over [modulo the > trailing slash issue Daniel caught]. RedirectMatch doesn't Unless you explicitly use a capture/backreference, of course.

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Eric Covener
On Mon, Jun 26, 2017 at 5:58 PM, Nigel Peck wrote: > They wouldn't redirect in the same way, but it would be the same type of > redirect. Since the second one preserves the page on the site that it is > redirecting, which is a very big difference. That's not correct.

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Nigel Peck
On 26/06/2017 16:56, Felipe Pereira wrote: Yes. In the second line you could use R=permanent or R=301 so they would redirect the same way. They wouldn't redirect in the same way, but it would be the same type of redirect. Since the second one preserves the page on the site that it is

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Felipe Pereira
2017-06-26 17:08 GMT-03:00 Nigel Peck : > > Sorry, one other point, using `[R]` in number two will generate a 302 > redirect whereas the first, using the permanent keyword, will generate a 301 Yes. In the second line you could use R=permanent or R=301 so they would

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Nigel Peck
Sorry, one other point, using `[R]` in number two will generate a 302 redirect whereas the first, using the permanent keyword, will generate a 301. On 26/06/2017 15:07, Nigel Peck wrote: Also note that the first one will always redirect to the root of the target domain, but the second one

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Nigel Peck
Also note that the first one will always redirect to the root of the target domain, but the second one will redirect to the same page on the target domain. First one: (taking Daniel's comment in to account) /example redirects to http://www.domain.com/ Second one: /example redirects to

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Daniel
Note the first one (the redirect) will probably redirect incorrectly, target should end with a trailing slash. Golden rule: if souce ends in trailing slash, target must also end in trailing slash. 2017-06-26 21:23 GMT+02:00 Eric Covener : > On Mon, Jun 26, 2017 at 3:16 PM,

Re: [users@httpd] redirect vs. rewrite

2017-06-26 Thread Eric Covener
On Mon, Jun 26, 2017 at 3:16 PM, David Mehler wrote: > I'm using apache 2.4. What is the difference between these lines? > > Redirect permanent / http://www.domain.com > RewriteRule ^/?(.*) http://www.domain.com/$1 [R,L] Nothing really, when you add the 'R' flag you're

[users@httpd] redirect vs. rewrite

2017-06-26 Thread David Mehler
Hello, I'm using apache 2.4. What is the difference between these lines? Redirect permanent / http://www.domain.com RewriteRule ^/?(.*) http://www.domain.com/$1 [R,L] They both redirect. Thanks. Dave. - To unsubscribe,