Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Reese
On 26-Jan-10 21:37, Oliver Schoenborn wrote: I love chocolate chip cookies You helped too, so why not? ;) Reese - The official User-To-User support forum of the Apache HTTP Server Project. See http://httpd.apache.org/use

RE: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Oliver Schoenborn
I love chocolate chip cookies From: Reese [howel...@inkworkswell.com] Sent: Tuesday, January 26, 2010 8:06 PM To: users@httpd.apache.org Subject: Re: [us...@httpd] Rewrite Voodoo pt. 2 ... If you were local to me, I'd offer you a cookie. Choc

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Reese
On 26-Jan-10 19:41, Eric Covener wrote: On Tue, Jan 26, 2010 at 6:12 PM, Reese wrote: RewriteEngine On RewriteCond %{HOST_HTTP} (www\.)?domain.ext RewriteRule ^/(string1)/(.*)$ $2\.domain\.ext/$3 [R=301,L] Much closer to being reasonable. You have more backreferences ($1, $2, $3) then you h

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Eric Covener
On Tue, Jan 26, 2010 at 6:12 PM, Reese wrote: > RewriteEngine On > RewriteCond %{HOST_HTTP} (www\.)?domain.ext > RewriteRule ^/(string1)/(.*)$ $2\.domain\.ext/$3 [R=301,L] > Much closer to being reasonable. You have more backreferences ($1, $2, $3) then you have captures. You probably want some

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Reese
On 26-Jan-10 17:55, Reese wrote: How about this? RewriteEngine On RewriteCond %{HOST_HTTP} (www\.)?domain.ext/string1/ RewriteRule ^/(string1)/(.*)$ $2\.domain\.ext/$3 [R=301,L] I'm having 2nd thoughts on that. How about this one? RewriteEngine On RewriteCond %{HOST_HTTP} (www\.)?domain.ext

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Reese
On 26-Jan-10 17:21, Frank Gingras wrote: You can't use %(HTTP_HOST) in the matching portion of the rule. Dang. How about this? RewriteEngine On RewriteCond %{HOST_HTTP} (www\.)?domain.ext/string1/ RewriteRule ^/(string1)/(.*)$ $2\.domain\.ext/$3 [R=301,L] Reese ---

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Frank Gingras
On 01/26/2010 05:07 PM, Reese wrote: I've been rolling everything that has been said around in my head, and now I'm wondering why something like the below would not work: RewriteEngine On RewriteCond (/sring1/) RewriteRule ^%(HTTP_HOST)/(string1)/(.*)% $2\.domain\.ext/$3 Or am I just not get

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-26 Thread Reese
I've been rolling everything that has been said around in my head, and now I'm wondering why something like the below would not work: RewriteEngine On RewriteCond (/sring1/) RewriteRule ^%(HTTP_HOST)/(string1)/(.*)% $2\.domain\.ext/$3 Or am I just not getting it still? Reese

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-25 Thread Reese
On 25-Jan-10 12:02, Oliver Schoenborn wrote: It's really important to understand how the conditions and pattern matching work, together with regexp. There may be other issues to consider when the rule is in an .htaccess (I gather you only get part of the URL path then). I'm familiar with The

RE: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-25 Thread Oliver Schoenborn
> Can you interpret: >> >> rewriteCond $(HOST_NAME) ^(.*)\.domain\.ext > > Condition, proceed for host_name matching (anySubdomain).domain.ext > >> rewriteRule ^(.*)$ $(HOST_NAME)$1 > > Rule, I'm not sure what it does. Based on the link Tom posted, I'd > guess that it takes everything after

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-23 Thread Eric Covener
On Sat, Jan 23, 2010 at 3:56 PM, Reese wrote: > On 23-Jan-10 10:38, Eric Covener wrote: > >> What's the full input URL that you're matching? > > The majority of links use string1.domain.ext/filenameDDMMYY.ext but > a minority of links use www.domain.ext/string1/filenameDDMMYY.ext > > The desire wa

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-23 Thread Reese
On 23-Jan-10 10:38, Eric Covener wrote: What's the full input URL that you're matching? The majority of links use string1.domain.ext/filenameDDMMYY.ext but a minority of links use www.domain.ext/string1/filenameDDMMYY.ext The desire was for a rule at domain.ext/.htaccess to catch the minority

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-23 Thread Eric Covener
On Sat, Jan 23, 2010 at 8:50 AM, Reese wrote: >> rewriteRule ^([a-z])(.*)([0-9])\.domain\.ext(.*) www$3.domain.ext/$2_$1$4 > > Rule, > lowercase-alpha saved as $1 > plus > zero or more of everything saved as $2 > plus > 0-9 numeric saved as $3 > plus > domain.ext > plus > zero or more of anything

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-23 Thread Reese
Apologies for the delay in responding to this, I've been busy. On 20-Jan-10 07:13, Oliver Schoenborn wrote: RewriteEngine On RewriteRule ^domain\.ext/subdomain/(.*)$ subdomain\.domain\.ext/$2 [R=301,L] No better. Dang. It's moot as far as the client is concerned, pt 1 finished my contract

RE: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-20 Thread Oliver Schoenborn
> >> My attempt was: >> >> RewriteEngine On >> RewriteRule ^(www\.)?domain\.ext/subdomain/(.*)$ >> subdomain\.domain\.ext/$2 [R=301,L] >> >> I now think this would be better: >> >> RewriteEngine On >> RewriteRule ^domain\.ext/subdomain/(.*)$ subdomain\.domain\.ext/$2 >> [R=301,L] > > No

RE: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-20 Thread daniel . goulder
> On 19 January 2010 22:24, Reese wrote: > > On 19-Jan-10 17:16, Peter J Milanese wrote: > > Have to throw in something here. Tom gave you the right answers. What > > exactly is 'one of those'? > > RTFM is not always the "right" answer to the question asked. I agree, but Tom's answer was more tha

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Eric Covener
On 1/19/10, Jonathan Zuckerman wrote: > I'm pretty sure nobody wants this to turn into a mod_rewrite solve-it-for-me > mailing list. We only give out the magic incantations on IRC. -- Eric Covener cove...@gmail.com - The offic

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Jonathan Zuckerman
hink' you > want. It does not know anything about hostname. > > > P > > > - Original Message - > From: Reese [howel...@inkworkswell.com] > Sent: 01/19/2010 05:24 PM EST > To: users@httpd.apache.org > Subject: Re: [us...@httpd] Rewrite Voodoo pt. 2 > &

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Peter J Milanese
- Original Message - From: Reese [howel...@inkworkswell.com] Sent: 01/19/2010 05:24 PM EST To: users@httpd.apache.org Subject: Re: [us...@httpd] Rewrite Voodoo pt. 2 On 19-Jan-10 17:16, Peter J Milanese wrote: Have to throw in something here. Tom gave you the right answers. What exactly is &#x

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Reese
On 19-Jan-10 17:16, Peter J Milanese wrote: Have to throw in something here. Tom gave you the right answers. What exactly is 'one of those'? RTFM is not always the "right" answer to the question asked. The list is comprised of good questions and answers. Not part time employees :) My effort

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Peter J Milanese
To: users@httpd.apache.org Subject: Re: [us...@httpd] Rewrite Voodoo pt. 2 On 19-Jan-10 10:33, Tom Evans wrote: RewriteRules operate over the part of the URL after the host and before the query string, so you would be wanting to try out RewriteCond. See http://httpd.apache.org/docs/2.2/mod/mod_re

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Reese
On 19-Jan-10 10:33, Tom Evans wrote: RewriteRules operate over the part of the URL after the host and before the query string, so you would be wanting to try out RewriteCond. See http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule , in particular the section labelled 'What is matc

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Reese
On 19-Jan-10 15:23, Oliver Schoenborn wrote: Well, I was going to make an attempt, but with that kind of attitude, doesn't feel right, regardless of how frustratring or voodoo'ish the docs are. My apologies to you, whether you actually make an attempt or not. It's frustrating, when you are ne

RE: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Oliver Schoenborn
Reese wrote: > > It tells me that the part after the host (I want to change the host > name) and the part after the query string (that I'm not using if I > understand the usage) are tips of the iceberg. And that is the part > I'm trying to understand. And neither Tom nor you are helping. > > Did I

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Reese
On 19-Jan-10 14:57, Eric Covener wrote: Tom pointed you to the FAQ that makes your rule appear to be a no-op and even took the time to restate it in-line. What, this? RewriteRules operate over the part of the URL after the host and before the query string, so you would be wanting to try ou

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Eric Covener
On 1/19/10, Reese wrote: > > > RewriteRule ^(www\.)?domain\.ext/subdomain/(.*)$ > > > subdomain\.domain\.ext/$2 > > RewriteRules operate over the part of the URL after the host and > > before the query string, so you would be wanting to try out > > RewriteCond. > > > > > See > http://httpd.apac

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Reese
It looks like that one escaped before I was finished replying. My apologies. I suggested this: RewriteEngine On RewriteRule ^(www\.)?domain\.ext/subdomain/(.*)$ subdomain\.domain\.ext/$2 [R=301,L] On 19-Jan-10 10:33, Tom Evans wrote: RewriteRules operate over the part of the URL after th

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Reese
I suggested this: RewriteEngine On RewriteRule ^(www\.)?domain\.ext/subdomain/(.*)$ subdomain\.domain\.ext/$2 [R=301,L] On 19-Jan-10 10:33, Tom Evans wrote: RewriteRules operate over the part of the URL after the host and before the query string, so you would be wanting to try out RewriteCo

Re: [us...@httpd] Rewrite Voodoo pt. 2

2010-01-19 Thread Tom Evans
On Tue, Jan 19, 2010 at 2:47 PM, Reese wrote: > Hi everyone, > > We're experiencing some difficulty that I'm not entirely sure of > the origin of. Most URLs to content in a subdomain link through > the subdomain, but a few are linking a subdirectory of the main > domain instead > > domain.ext/subd