Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-11 Thread Reese
We did testing on this over the weekend, the rewrite rule went live Sunday night. As of this writing, there are a few minor issues not related to the rewrite rule, they are related to moving files around after the rewrite rule was tested. So this seems like a done deal. Thank you to all who provi

RE: [us...@httpd] Mod_Rewrite voodoo

2010-01-11 Thread Oliver Schoenborn
> From: Reese [mailto:howel...@inkworkswell.com] > > >> I tried: > >> > >> RewriteEngine On > >> RewriteCond %{HTTP_HOST} subdomain\.domain\.ext > >> RewriteCond %{REQUEST_URI} ^/20\d+ > >> RewriteRule (.*)(0[5-9]).html$ /20$2/$1$2.html [R=301,L] > >> > >> For http://subdomain.domain.ext/fileDDMMY

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-09 Thread Reese
On 09-Jan-10 14:29, Eric Covener wrote: I tried: RewriteEngine On RewriteCond %{HTTP_HOST} subdomain\.domain\.ext RewriteCond %{REQUEST_URI} ^/20\d+ RewriteRule (.*)(0[5-9]).html$ /20$2/$1$2.html [R=301,L] For http://subdomain.domain.ext/fileDDMMYY.ext there was no effect, that file loaded at

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-09 Thread Eric Covener
On Sat, Jan 9, 2010 at 3:18 PM, Reese wrote: > On 09-Jan-10 14:29, Eric Covener wrote: > >>> I tried: >>> >>> RewriteEngine On >>> RewriteCond %{HTTP_HOST} subdomain\.domain\.ext >>> RewriteCond %{REQUEST_URI} ^/20\d+ >>> RewriteRule (.*)(0[5-9]).html$ /20$2/$1$2.html [R=301,L] >>> >>> For http://

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-09 Thread Eric Covener
On Sat, Jan 9, 2010 at 1:37 PM, Reese wrote: > On 09-Jan-10 13:07, Eric Covener wrote: > >> To kill the looping: >> >> RewriteCond %{REQUEST_URI} ^/20\d+ > > I tried: > > RewriteEngine On > RewriteCond %{HTTP_HOST} subdomain\.domain\.ext > RewriteCond %{REQUEST_URI} ^/20\d+ > RewriteRule (.*)(0[5-

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-09 Thread Reese
On 09-Jan-10 13:07, Eric Covener wrote: To kill the looping: RewriteCond %{REQUEST_URI} ^/20\d+ I tried: RewriteEngine On RewriteCond %{HTTP_HOST} subdomain\.domain\.ext RewriteCond %{REQUEST_URI} ^/20\d+ RewriteRule (.*)(0[5-9]).html$ /20$2/$1$2.html [R=301,L] For http://subdomain.domain.e

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-09 Thread Eric Covener
On Sat, Jan 9, 2010 at 12:54 PM, Reese wrote: > I said I would test this, > >>  RewriteEngine On >>  RewriteCond %{HTTP_HOST} subdomain\.domain\.ext >>  RewriteRule (.*)(0[5-6]).html$ /20$2/$1$2.html [R=301,L] > > Testing had mixed results. > > When this rule was at subdomain.domain.ext/sandbox/.h

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-09 Thread Reese
I said I would test this, RewriteEngine On RewriteCond %{HTTP_HOST} subdomain\.domain\.ext RewriteRule (.*)(0[5-6]).html$ /20$2/$1$2.html [R=301,L] Testing had mixed results. When this rule was at subdomain.domain.ext/sandbox/.htaccess and the submitted url was http://subdomain.domain.ext

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Reese
On 07-Jan-10 13:08, Patrick Horgan wrote: RewriteEngine Off This says never mind, I didn't mean to hit the switch, let me turn it back off and turn off the rewriting engine so no rewriting will be done as httpd does it's job. I grok. Now, I grok better. ;) Reese

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Reese
On 07-Jan-10 12:58, Tom Evans wrote: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriteengine The first line is edifying: "The RewriteEngine directive enables or disables the runtime rewriting engine. If it is set to off this module does no runtime processing at all. It does not eve

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Patrick Horgan
Reese wrote: RewriteEngine On This says, that I want part of the job of httpd is to do rewrites from this instant until the server is stopped. It's as if a part of httpd is just sitting there, able to do rewrites, but the switch for it is turned off to save power if it's not going to be used

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Tom Evans
On Thu, Jan 7, 2010 at 5:47 PM, Reese wrote: > On 07-Jan-10 12:24, Tom Evans wrote: > >> "RewriteEngine Off" disables the rewrite engine, so that rewrite rules >> are not applied. Seems unlikely that is what you intended. > > It would appear that, by removing the "RewriteEngine Off" line, > the bi

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Reese
On 07-Jan-10 12:24, Tom Evans wrote: "RewriteEngine Off" disables the rewrite engine, so that rewrite rules are not applied. Seems unlikely that is what you intended. It would appear that, by removing the "RewriteEngine Off" line, the bits on the prior 3 lines now work as expected and intended

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Eric Covener
On Thu, Jan 7, 2010 at 12:36 PM, Reese wrote: > Do X > ...does X > ...after doing X > Stop doing X > > I'm missing something here. Maybe it's a terminology issue. Do you > mean to say, the "RewriteEngine Off" directive cancels the Rewrites > on earlier lines? On how many earlier lines? Etc. > It

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Reese
On 07-Jan-10 12:24, Tom Evans wrote: http://lmgtfy.com/?q=bookend Oh, thanks. I didn't know what shelfspace keepers were. @@ "RewriteEngine Off" disables the rewrite engine, so that rewrite rules are not applied. Seems unlikely that is what you intended. From that, I'd agree with you. My u

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Tom Evans
On Thu, Jan 7, 2010 at 5:18 PM, Reese wrote: > On 07-Jan-10 11:22, Eric Covener wrote: >> >> On 1/7/10, Reese wrote: >> >>>  RewriteEngine On >>>  RewriteCond %{HTTP_HOST} subdomain\.domain\.ext >>>  RewriteRule (.*)(0[5-6]).html$ /20$2/$1$2.html [R=301,L] >>>  RewriteEngine Off >> >> You don't b

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Reese
On 07-Jan-10 11:22, Eric Covener wrote: On 1/7/10, Reese wrote: RewriteEngine On RewriteCond %{HTTP_HOST} subdomain\.domain\.ext RewriteRule (.*)(0[5-6]).html$ /20$2/$1$2.html [R=301,L] RewriteEngine Off You don't bookend your rules with on/off. Meaning what, exactly? This is the only

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Eric Covener
On 1/7/10, Reese wrote: > RewriteEngine On > RewriteCond %{HTTP_HOST} subdomain\.domain\.ext > RewriteRule (.*)(0[5-6]).html$ /20$2/$1$2.html [R=301,L] > RewriteEngine Off You don't bookend your rules with on/off. -- Eric Covener cove...@gmail.com -

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-07 Thread Reese
On 06-Jan-10 15:58, Reese wrote: Hmmm. So adding more specificity, for years 2005-2009 and only for the affected domain, this should work: RewriteCond %{HTTP_HOST} domain\.com RewriteRule (.*)(0[5-9]).html$ /20$2/$1$2.html [R=301,L] I'll test it. It doesn't seem to be working. Testing for f

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-06 Thread Igor Cicimov
One more thing, it will work for this century only since 20xx is hard coded in the rule. Thought should mention it although it's not going to be your problem in 2100 haha On Thu, Jan 7, 2010 at 7:58 AM, Reese wrote: > On 06-Jan-10 15:50, Patrick Horgan wrote: > > So adding RewriteCond %{HTTP_H

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-06 Thread Reese
On 06-Jan-10 15:50, Patrick Horgan wrote: So adding RewriteCond %{HTTP_HOST} domain\.com is needed, yes? RewriteRule (.*)(0[0-9]).html$ /20$2/$1$2.html [R,L] Hmmm. So adding more specificity, for years 2005-2009 and only for the affected domain, this should work: RewriteCond %{HTTP_HOST}

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-06 Thread Patrick Horgan
Reese wrote: On 06-Jan-10 13:16, Reese wrote: On 05-Jan-10 17:43, Igor Cicimov wrote: You can try this RewriteEngine On RewriteRule (.*)([0-9]{2}).html$ /20$2/$1$2.html [R,L] I'm also not sure what would prevent this from becoming endlessly recursive, since the domain/2005/file013105.html f

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-06 Thread Reese
On 06-Jan-10 13:16, Reese wrote: On 05-Jan-10 17:43, Igor Cicimov wrote: You can try this RewriteEngine On RewriteRule (.*)([0-9]{2}).html$ /20$2/$1$2.html [R,L] I'm also not sure what would prevent this from becoming endlessly recursive, since the domain/2005/file013105.html file may still

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-06 Thread Reese
On 05-Jan-10 17:43, Igor Cicimov wrote: You can try this RewriteEngine On RewriteRule (.*)([0-9]{2}).html$ /20$2/$1$2.html [R,L] I wrote it on the go and haven't tested it. It might be done in different way probably but give this one a go and will see what can we do if it is not working. Okay

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-06 Thread Reese
On 05-Jan-10 02:52, Boyle Owen wrote: I am restructuring a Web site and need to move a number of files to different subdirectories. The files have an embedded date code in [filename]DDMMYY.ext format, I was hoping to hook the YY.ext portion to redirect ...05.html files to the 2005/ subdirectory,

Re: [us...@httpd] Mod_Rewrite voodoo

2010-01-05 Thread Igor Cicimov
Boyle Owen wrote: > > -Original Message- > > From: Reese [mailto:howel...@inkworkswell.com] > > Sent: Monday, January 04, 2010 5:34 PM > > To: users@httpd.apache.org > > Subject: [us...@httpd] Mod_Rewrite voodoo > > > > Hello everyone, > >

RE: [us...@httpd] Mod_Rewrite voodoo

2010-01-04 Thread Boyle Owen
> -Original Message- > From: Reese [mailto:howel...@inkworkswell.com] > Sent: Monday, January 04, 2010 5:34 PM > To: users@httpd.apache.org > Subject: [us...@httpd] Mod_Rewrite voodoo > > Hello everyone, > > I am restructuring a Web site and need to move a num

[us...@httpd] Mod_Rewrite voodoo

2010-01-04 Thread Reese
Hello everyone, I am restructuring a Web site and need to move a number of files to different subdirectories. The files have an embedded date code in [filename]DDMMYY.ext format, I was hoping to hook the YY.ext portion to redirect ...05.html files to the 2005/ subdirectory, ...06.html files to th