[us...@httpd] mod_rewrite external RewriteMap in high-load setup

2010-12-17 Thread Matthias Wermund
Hello to all, I have a question regarding the use of an external RewriteMap (prg) on a high-traffic website. My goal is to implement a redirection at the root of the site, depending on some request attributes (User-Agent and more) sent to an external HTTP service. So I implemented a perl s

[us...@httpd] mod_rewrite in Melbourne?

2010-10-28 Thread Rich Bowen
The local PHP User Group in Melbourne, Australia, wants to have a session on mod_rewrite. Is there anyone in Melbourne who would be willing to give a brief presentation? It's a PUG, so obviously informal and small. Please respond to me directly. Thanks. -- Rich Bowen rbo...@rcbowen.com

Re: [us...@httpd] mod_rewrite is not working

2010-10-19 Thread Joost de Heer
On Tue, October 19, 2010 07:48, Tushar Chavan wrote: > RewriteRule ^/(sap\(.*) http://srmdev.kjo.com.sa:8000/sap($1 [P,L] You have a missing ( RewriteRule ^/sap\((.*) http://srmdev.kjo.com.sa:8000/sap($1 [P,L] Hint: RewriteLog and RewriteLogLevel Joost -

[us...@httpd] mod_rewrite is not working

2010-10-18 Thread Tushar Chavan
Hi Experts, In my case mod_rewrite is not working. Below is the case. Url https://srmdevarp02.domain/sap(bD1lbiZjPTExNiZwPTMyODMxJnY9NyUyZTAxMDYmaT0xJnM9U0lEJTNhQU5PTiUzYXNybWRldl9TRURfMDAlM2FGc3U4REN3TDVnckM1LWpGWXBfSlUyTWlQV3hENmM4VnRhbkdsU0xWLUFUVA==)/bc/bsp/sap/ros_prescreen/main.do S

Re: [us...@httpd] mod_rewrite fails

2010-10-18 Thread Eric Covener
> everything going to https://somesite.com needs to go to http://somesite.com > so for example https://somesite.com/somedir/somefile.php?somevar=someval > needs to be redirected to > http://somesite.com/somedir/somefile.php?somevar=someval > and that is true except for when goint to say > http://so

Re: [us...@httpd] mod_rewrite fails

2010-10-18 Thread James Jones
I've tried dozens of iterations of rules, from simple like ^wp-login to much harder and more complex ones matching the whole address or only a part of one, it seems that i cant get any of them to work, either the rule will rewrite all the urls to http, or i get into an infinite redirect loop..

Re: [us...@httpd] mod_rewrite fails

2010-10-18 Thread Eric Covener
On Mon, Oct 18, 2010 at 1:43 PM, James Jones wrote: > can someone explain why neither of these rules work: Without a rewritelog or a description of what URL is/is-not rewritten as you expect, it will be difficult. What context are your rules in? htaccess, , ? > Rule 1: > RewriteCond %{HTTP_HO

[us...@httpd] mod_rewrite fails

2010-10-18 Thread James Jones
can someone explain why neither of these rules work:_ Rule 1:_ RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^(.*)(?!wp-login) [NC] RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L] _Rule 2:_ RewriteCond %{REQUEST_URI} ^wp-login(.*)$ RewriteRule .? - [S=1] RewriteCond %{

Re: [us...@httpd] mod_rewrite: use rewrite map in RewriteCond pattern?

2010-10-08 Thread Brian Hirt
On Oct 8, 2010, at 12:19 PM, Eric Covener wrote: > RewriteCond %{HTTP_HOST},${hn:www} ^([^,]+),\1 Eric, Thanks for the pointer, it worked like a charm. Note to others, this doesn't appear to work with 1.3 --brian - The off

Re: [us...@httpd] mod_rewrite: use rewrite map in RewriteCond pattern?

2010-10-08 Thread Eric Covener
On Fri, Oct 8, 2010 at 2:14 PM, Brian Hirt wrote: > Is there any way to accomplish something like the following? > > RewriteMap hn txt:/apache/config/hostname.map > RewriteCond %{HTTP_HOST}        ${hn:www} [NC] > you can't have variables of any kind in the regex, because it's only compiled once

[us...@httpd] mod_rewrite: use rewrite map in RewriteCond pattern?

2010-10-08 Thread Brian Hirt
Is there any way to accomplish something like the following? RewriteMap hn txt:/apache/config/hostname.map RewriteCond %{HTTP_HOST}${hn:www} [NC] Thanks! - The official User-To-User support forum of the Apache HTTP Serve

Re: [us...@httpd] mod_rewrite loop

2010-09-24 Thread Walther Bauer
Ok, thanks for mentioning RewriteLog, didn't know there is an extra logfile for mod_rewrite. That helped me figuring it out: In the second example, apache recognizes the rewritten url equals the original url and aborts rewriting process. ("initial URL equal rewritten URL: test/server.php [IGNORING

Re: [us...@httpd] mod_rewrite loop

2010-09-24 Thread Frank Gingras
On 24/09/2010 4:36 PM, Walther Bauer wrote: Yeah, I've unterstood that so far. But why does the second example _not_ produce an infinite loop? You need to check the RewriteLog to find out why. It may depend on the context, or other factors. Frank ---

Re: [us...@httpd] mod_rewrite loop

2010-09-24 Thread Eric Covener
On Fri, Sep 24, 2010 at 4:36 PM, Walther Bauer <2313...@googlemail.com> wrote: > Yeah, I've unterstood that so far. But why does the second example _not_ > produce an infinite loop? Can you attach a rewritelog of the two cases? Must be some usually uninteresting quirk as opposed to the standard l

Re: [us...@httpd] mod_rewrite loop

2010-09-24 Thread Walther Bauer
Yeah, I've unterstood that so far. But why does the second example _not_ produce an infinite loop?

Re: [us...@httpd] mod_rewrite loop

2010-09-24 Thread Frank Gingras
On 24/09/2010 9:59 AM, Walther Bauer wrote: This .htaccess snippet creates an "Request exceeded the limit of 10 internal redirects"-error on my server (XAMPP): RewriteEngine On RewriteRule ^(.*)$ ./server.php while the following does not: RewriteEngine On RewriteRule ^(.*)$ server.php So why

[us...@httpd] mod_rewrite loop

2010-09-24 Thread Walther Bauer
This .htaccess snippet creates an "Request exceeded the limit of 10 internal redirects"-error on my server (XAMPP): RewriteEngine On RewriteRule ^(.*)$ ./server.php while the following does not: RewriteEngine On RewriteRule ^(.*)$ server.php So why does the "./" actually make a difference? Than

Re: [us...@httpd] mod_rewrite problem with mod_fcgid

2010-08-28 Thread Umar
But same thing is working with mod_php, I am sure problem with mod_fcgid, not the php script. Regards, Igor Cicimov wrote: > > And whats wrong with the rule? Looks to me that your php script is not > right. > > Sent from my phone > > On Aug 28, 2010 7:50 PM, "Umar" wrote: > > > Dear User,

Re: [us...@httpd] mod_rewrite problem with mod_fcgid

2010-08-28 Thread Igor Cicimov
And whats wrong with the rule? Looks to me that your php script is not right. Sent from my phone On Aug 28, 2010 7:50 PM, "Umar" wrote: Dear User, Recently i have configured mod_fcgid + php + apache on FreeBSD everything is working fine. But my mod_rewrite rul is not working. Here is my virt

[us...@httpd] mod_rewrite problem with mod_fcgid

2010-08-28 Thread Umar
Dear User, Recently i have configured mod_fcgid + php + apache on FreeBSD everything is working fine. But my mod_rewrite rul is not working. Here is my virtualhost setting ServerAdmin unix...@gmail.com DocumentRoot "/usr/local/www/mydata" ServerName unix.expample.org ErrorLog "

Re: [us...@httpd] mod_rewrite gives 404

2010-07-17 Thread Ross Noonan
Got it working - changed to Options All. Thanks On Sat, Jul 17, 2010 at 6:50 PM, Ross Noonan wrote: > Thanks for the reply. > > Yes I am on windows 7 and I have not started my editor as admin but the > module is loaded in my php info which would indicate that my changes are > taking effect?? >

Re: [us...@httpd] mod_rewrite gives 404

2010-07-17 Thread Ross Noonan
Thanks for the reply. Yes I am on windows 7 and I have not started my editor as admin but the module is loaded in my php info which would indicate that my changes are taking effect?? "Does garbage in your .htaccess trigger a 500 error?" Sorry for my ignorance but what do you mean here? On Sat, J

Re: [us...@httpd] mod_rewrite gives 404

2010-07-17 Thread Eric Covener
> [Sat Jul 17 17:53:50 2010] [error] [client 127.0.0.1] File does not exist: > C:/htdocs/competition/login Are you on windows7 and editing a httpd.conf installed into Program Files w/o starting your editor as admin? Does garbage in your .htaccess trigger a 500 error? -- Eric Covener cove...@gma

[us...@httpd] mod_rewrite gives 404

2010-07-17 Thread Ross Noonan
Hi, I have recently got a new pc and have installed php/mysql and apache. Everything works fine except for the mod_rewrite. I have uncommented the "LoadModule rewrite_module modules/mod_rewrite.so" and added this: # # Possible values for the Options directive are "None", "All", # or any

RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-09 Thread S. Saberi
Actually I figured it out finally , I had to set the RewriteBase to /scripts and voila. Thanks for all the feedbacks though set me on the right path. Cheers. From: ssab...@hotmail.com To: users@httpd.apache.org Subject: RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one

RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-09 Thread S. Saberi
@httpd.apache.org Subject: RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another Date: Wed, 7 Jul 2010 15:08:44 -0700 Alright, finally got the rewrite log to work and here is what it spits out when I attempt the redirect described earlier: [07/Jul/2010:15:05:07 --0700

RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-07 Thread S. Saberi
t; Date: Wed, 7 Jul 2010 08:18:23 -0400 > From: cove...@gmail.com > To: users@httpd.apache.org > Subject: Re: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi > script to another > > On Wed, Jul 7, 2010 at 1:41 AM, S. Saberi wrote: > > actually I just put the

Re: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-07 Thread Eric Covener
On Wed, Jul 7, 2010 at 1:41 AM, S. Saberi wrote: > actually I just put the directive into the httpd.conf file and i see that > the log file is being created upon restart of apache. > > But when I invokde the rewrite nothing gets logged into it. > > Any guidance is greatly appreciated. > It's gott

RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-06 Thread S. Saberi
Subject: RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another Date: Tue, 6 Jul 2010 20:12:44 -0700 Please excuse my ignorance I went though that link but I still don't understand how it needs to be defined. Do I have to put it in httpd.conf? Could you please

RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-06 Thread S. Saberi
> Subject: Re: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi > script to another > > On Tue, Jul 6, 2010 at 3:41 PM, S. Saberi wrote: > > I added the the RewriteLog entry but no matter which location i specify I > > get the following error: > > >

Re: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-06 Thread Eric Covener
On Tue, Jul 6, 2010 at 3:41 PM, S. Saberi wrote: > I added the the RewriteLog entry but no matter which location i specify I > get the following error: > > "C:/Program Files/Apache Software Foundation/Apache2.2/scripts/.htaccess: > RewriteLog not allowed here" > > What am I missing here? > Rewrite

RE: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-06 Thread S. Saberi
> From: cove...@gmail.com > To: users@httpd.apache.org > Subject: Re: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi > script to another > > On Fri, Jul 2, 2010 at 1:58 AM, S. Saberi wrote: > > Hi all, > > > > I am getting a 404 error when tr

Re: [us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-03 Thread Eric Covener
On Fri, Jul 2, 2010 at 1:58 AM, S. Saberi wrote: > Hi all, > > I am getting a 404 error when trying to rewrite one cgi script to another > one such as: > > Options FollowSymLinks > RewriteEngine on > RewriteRule ^from.cgi to.cgi Tried with a proper RewriteBase? What does the RewriteLog say? -

[us...@httpd] mod_rewrite - Error when trying to rewrite one cgi script to another

2010-07-01 Thread S. Saberi
Hi all, I am getting a 404 error when trying to rewrite one cgi script to another one such as: Options FollowSymLinks RewriteEngine on RewriteRule ^from.cgi to.cgi With this rule above my expectaion is that the following url: mydomain/cgi-bin/from.cgi will be rewritten to mydomain/cgi-bin/to

Re: [us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-06-17 Thread Tapas Mishra
Hi,Tom Thanks a lot for your help.After going through some more documentation and tests I did generate the correct URL and it is actually working the way you said. Thanks for your explanation. -- Tapas http://mightydreams.blogspot.com http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers -

Re: [us...@httpd] mod_rewrite: skip flag and how chained lines are counted

2010-06-04 Thread Eric Covener
On Fri, Jun 4, 2010 at 9:48 AM, Alex Harvey wrote: > Hi all, > > I have been unable to find this documented anywhere, so here goes. > > According to the Apache documentation: "The [S] flag is used to skip rules > that you don't want to run." Great, so I can skip N rules by using the [S=N] > flag.

[us...@httpd] mod_rewrite: skip flag and how chained lines are counted

2010-06-04 Thread Alex Harvey
Hi all, I have been unable to find this documented anywhere, so here goes. According to the Apache documentation: "The [S] flag is used to skip rules that you don't want to run." Great, so I can skip N rules by using the [S=N] flag. But how are chained rules counted? The documentation is ambiguo

Re: [us...@httpd] mod_rewrite/mod_ssl questions

2010-05-28 Thread Beto Limoun
Something I also found useful was to use the following directive. RewriteMap escaping int:unescape before my RW rules and changing the RW rules like this RewriteRule ^/user ${escaping:https://%{HTTP_HOST}%{REQUEST_URI}} [R,L] etc.. have a look at http://www.dracos.co.uk/code/apache-rewrite-pro

Re: [us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-05-27 Thread Tom Evans
On Thu, May 27, 2010 at 2:20 PM, Eric Covener wrote: > On Thu, May 27, 2010 at 8:36 AM, Krist van Besien > wrote: >> Hello, >> >> I'm not entirely sure what your problem is. There is not a single >> question in your mail. >> >> What is your problem? What are you trying to achieve? What are you >>

Re: [us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-05-27 Thread Eric Covener
On Thu, May 27, 2010 at 8:36 AM, Krist van Besien wrote: > Hello, > > I'm not entirely sure what your problem is. There is not a single > question in your mail. > > What is your problem? What are you trying to achieve? What are you > getting in stead? +1 -- I punched out before reading the entire

Re: [us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-05-27 Thread Krist van Besien
Hello, I'm not entirely sure what your problem is. There is not a single question in your mail. What is your problem? What are you trying to achieve? What are you getting in stead? Krist -- krist.vanbes...@gmail.com kr...@vanbesien.org Bremgarten b. Bern, Switzerland -- A: It reverses the nor

[us...@httpd] mod_rewrite problem IP address coming in URL instead of domain name.

2010-05-26 Thread Tapas Mishra
The configuration is like this Code: |--192.168.1.1 |(site1.abc.com) | |--192.168.1.2 |(site2.a

Re: [us...@httpd] mod_rewrite/mod_ssl questions

2010-05-22 Thread Beto Limoun
Thanks for this Reinhard, I agree, the env settings in my rules are just making a lot of noise. Your rules are much easier. One problem I see is that your [2] seems to create an infinite loop. When a user go to http://localhost/myapp. This will infinitely trigger the rule over and over again. W

Re: [us...@httpd] mod_rewrite/mod_ssl questions

2010-05-21 Thread Reinhard Vicinus
Hi, the problem is that if a site which shouldn't be served by https is called by http your first rewriterule sets ps:https but the first rewriterule after #[2] isn't used because HTTPS is not on. I think you can also have your desired effect much more easier like this: #[1] all /user, /subs

[us...@httpd] mod_rewrite/mod_ssl questions

2010-05-21 Thread Beto Limoun
Hello group, I am working on the mod_ssl configuration on a website and trying to achieve following: When a user accesses a page posting sensitive data to the server, the page should be accessed in httpS mode. What I am doing to achieve this is that I have a set of rewrite rules that will match

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-07 Thread Karsten Bräckelmann
Please do Cc me on every reply. I'm subscribed to the allow post list, but I am not subscribed to receive list posts. Can't stand yet another mailing list at this point, just for one thread. > > "A dash indicates that no substitution should be performed (the > > existing path is passed through

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-07 Thread Eric Covener
On Fri, May 7, 2010 at 6:48 PM, Karsten Bräckelmann wrote: >  "A dash indicates that no substitution should be performed (the >  existing path is passed through untouched). This is used when a flag >  (see below) needs to be applied without changing the path." > > Applying an R=301 flag in my cas

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-07 Thread Karsten Bräckelmann
On Sat, 2010-05-08 at 00:15 +0200, Karsten Bräckelmann wrote: > Thanks Igor and Eric for your help. :) However, I'm not convinced > that's the cause here. Below is a bare minimum example that shows the > weird behavior I started with... Sorry for replying to myself. Below is some more fodder gene

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-07 Thread Karsten Bräckelmann
Thanks Igor and Eric for your help. :) However, I'm not convinced that's the cause here. Below is a bare minimum example that shows the weird behavior I started with... On Fri, 2010-05-07 at 09:34 +1000, Igor Cicimov wrote: > Your 301 rule is wrong. As i said it should match the URI parth > meani

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-06 Thread Eric Covener
On Thu, May 6, 2010 at 6:48 PM, Karsten Bräckelmann wrote: > On Fri, 2010-05-07 at 08:28 +1000, Igor Cicimov wrote: >> Your RewriteRule is wrong it works with the URI part only and not the >> full URL. Read the mod_rewrite docos and correct your rule. > > Argh! An RTFM response. I probably deserve

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-06 Thread Igor Cicimov
Your 301 rule is wrong. As i said it should match the URI parth meaning the part after the slash following the domain name and not the whole URL. So no http:// in the rewrite rule hope this makes it more clear. Sent from my phone On May 7, 2010 8:48 AM, "Karsten Bräckelmann" wrote: On Fri, 2010

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-06 Thread Karsten Bräckelmann
On Fri, 2010-05-07 at 08:28 +1000, Igor Cicimov wrote: > Your RewriteRule is wrong it works with the URI part only and not the > full URL. Read the mod_rewrite docos and correct your rule. Argh! An RTFM response. I probably deserve it. But... I did read the docs. Lots of 'em. Still, I don't see w

Re: [us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-06 Thread Igor Cicimov
Your RewriteRule is wrong it works with the URI part only and not the full URL. Read the mod_rewrite docos and correct your rule. Sent from my phone On May 7, 2010 7:44 AM, "Karsten Bräckelmann" wrote: Please Cc me on every reply. I'm subscribed to the allow post list, but I am not subscribed

[us...@httpd] mod_rewrite Redirection ignoring the explicite code

2010-05-06 Thread Karsten Bräckelmann
Please Cc me on every reply. I'm subscribed to the allow post list, but I am not subscribed to receive list posts. Can't stand yet another mailing list at this point. ;) Yes, I know mod_rewrite is voodoo. ;) Anyway, here's a (somewhat) stripped down example of a case I really don't understand w

Re: [us...@httpd] mod_rewrite and location

2010-03-29 Thread Edgar Frank
10/03/29 Henrik Gemal > I use mod_rewrite and in the root of the website I have this > in the .htaccess file: Hi, mixing Location with .htaccess sounds wrong to me, as Location should be processed before URL-to-file mapping, but .htaccess can only be accessed after URL-to-file mapping. Be sure t

Re: [us...@httpd] mod_rewrite and location

2010-03-29 Thread Henrik Gemal
The problem is that if I do: Order deny,allow Deny from all Order deny,allow Allow from all Order deny,allow Deny from all Allow from 127.0.0.1 then calling http://localhost/index.php/program2 would access program2 when he shouldn't

Re: [us...@httpd] mod_rewrite and location

2010-03-29 Thread Igor Cicimov
Your RewriteRule is wrong redirects everything to index.php in the root directory where you dont have access On Mar 29, 2010 8:24 PM, "Henrik Gemal" wrote: I use mod_rewrite and in the root of the website I have this in the .htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME

[us...@httpd] mod_rewrite and location

2010-03-29 Thread Henrik Gemal
I use mod_rewrite and in the root of the website I have this in the .htaccess file: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [qsappend,last] My index.php is simple: My URLs are something lik

Re: [us...@httpd] mod_rewrite problem: $1 and $2 not substituted into target url

2010-01-27 Thread Chris Brooks
Hi Eric, Yes, both are 1.3. I don't have Apache2.pm -- the mod_perl2 module -- installed. [r...@data2 ~]# perl -MApache2 -le 'print mod_perl->VERSION' Can't locate Apache2.pm in @INC (@INC contains: /www/perl/ /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/

Re: [us...@httpd] mod_rewrite problem: $1 and $2 not substituted into target url

2010-01-27 Thread Eric Covener
On Wed, Jan 27, 2010 at 8:38 AM, Chris Brooks wrote: > Hi Eric, > > Thanks for the note.  Both apache and mod_perl are up-to-date: > > [r...@data2 ~]# /usr/local/apache-perl/bin/httpd -v > Server version: Apache/1.3.41 (Unix) > Server built:   Sep  2 2009 15:34:13 Both systems are 1.3? -- Eric

Re: [us...@httpd] mod_rewrite problem: $1 and $2 not substituted into target url

2010-01-27 Thread Chris Brooks
Hi Eric, Thanks for the note. Both apache and mod_perl are up-to-date: [r...@data2 ~]# /usr/local/apache-perl/bin/httpd -v Server version: Apache/1.3.41 (Unix) Server built: Sep 2 2009 15:34:13 [r...@data2 ~]# perl -Mmod_perl -le 'print mod_perl->VERSION' 1.31 Thanks, Chris On Wed, Jan 27,

Re: [us...@httpd] mod_rewrite problem: $1 and $2 not substituted into target url

2010-01-27 Thread Eric Covener
On Tue, Jan 26, 2010 at 12:32 PM, Chris Brooks wrote: > Good morning Apache list, > > I have a strange mod_rewrite problem, and I'm not sure how to solve it.  I > have a RewriteRule that works correctly on one apache daemon, but doesn't > work when copied and pasted to the httpd.conf file of a sec

Re: [us...@httpd] mod_rewrite problem: $1 and $2 not substituted into target url

2010-01-27 Thread Chris Brooks
Good morning Krist, Thank you very much for your reply. No, I don't have any blocks in the httpd.conf, although this is a mod_perl enabled apache daemon. Thanks, Chris On Wed, Jan 27, 2010 at 5:16 AM, Krist van Besien wrote: > On Tue, Jan 26, 2010 at 6:32 PM, Chris Brooks wrote: > > > > Any

Re: [us...@httpd] mod_rewrite problem: $1 and $2 not substituted into target url

2010-01-27 Thread Krist van Besien
On Tue, Jan 26, 2010 at 6:32 PM, Chris Brooks wrote: > Any suggestions as to what might be going on? You are not using any sections by chance, are you? Krist -- krist.vanbes...@gmail.com kr...@vanbesien.org Bremgarten b. Bern, Switzerland -- A: It reverses the normal flow of conversation. Q

[us...@httpd] mod_rewrite problem: $1 and $2 not substituted into target url

2010-01-26 Thread Chris Brooks
Good morning Apache list, I have a strange mod_rewrite problem, and I'm not sure how to solve it. I have a RewriteRule that works correctly on one apache daemon, but doesn't work when copied and pasted to the httpd.conf file of a second apache daemon. To state this differently, on the second apa

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

RE: [us...@httpd] mod_rewrite + mod_headers :How to set Cache instructions for Rewritten .swf content only ?

2009-12-30 Thread Manoj Samtani
You can use the following code to cache only .swf files: Header set 604800 public must-revalidate regards Manoj Date: Thu, 10 Dec 2009 17:53:43 -0800 From: abap...@yahoo.com To: users@httpd.apache.org Subject: [us...@httpd] mod_rewrite + mod_headers :How to set Cache instructions for

Re: [us...@httpd] mod_rewrite + mod_headers :How to set Cache instructions for Rewritten .swf content only ?

2009-12-10 Thread Igor Cicimov
Header set Cache-Control "must-revalidate, proxy-revalidate" Header set Pragma "public" or use mod_headers commands per content (read the mod_headers instructions on apache.org) On Fri, Dec 11, 2009 at 12:53 PM, ABAPGUY wrote: > Hi Apache Experts, > I wish to set 2 Cache statements for .swf

[us...@httpd] mod_rewrite + mod_headers :How to set Cache instructions for Rewritten .swf content only ?

2009-12-10 Thread ABAPGUY
Hi Apache Experts, I wish to set 2 Cache statements for .swf files (only) . I am rewriting using mod_rewrite and have enabled mod_headers . My 1st attempt did not work : RewriteCond %{REQUEST_URI} \.(swf)$ [NC] Header set Cache-Control "must-revalidate, proxy-revalidate" Header set Pragma "publi

Re: [us...@httpd] mod_rewrite/rewriterule - forcing a HTTP 500 code on all access attempt?

2009-12-08 Thread Frank Z
happy that a very simple config exercise in Apache was able to solve the problem.   - Original Message From: Rich Bowen To: users@httpd.apache.org Sent: Fri, December 4, 2009 6:25:39 PM Subject: Re: [us...@httpd] mod_rewrite/rewriterule - forcing a HTTP 500 code on all access at

Re: [us...@httpd] mod_rewrite/rewriterule - forcing a HTTP 500 code on all access attempt?

2009-12-05 Thread André Warnier
Frank Z wrote: is there a way via RewriteRule to force all access to a certain URL to return with a HTTP 500 e.g. i have a number 3 applications that are or will be obsoleted and is expected to return a 500 to all callers who try to access it. so when someone tries to access a deprecated URL

Re: [us...@httpd] mod_rewrite/rewriterule - forcing a HTTP 500 code on all access attempt?

2009-12-04 Thread Rich Bowen
On Dec 4, 2009, at 20:25 , Frank Z wrote: is there a way via RewriteRule to force all access to a certain URL to return with a HTTP 500 e.g. i have a number 3 applications that are or will be obsoleted and is expected to return a 500 to all callers who try to access it. so when someone

Re: [us...@httpd] mod_rewrite/rewriterule - forcing a HTTP 500 code on all access attempt?

2009-12-04 Thread Nick Kew
On 5 Dec 2009, at 01:25, Frank Z wrote: > is there a way via RewriteRule to force all access to a certain URL to return > with a HTTP 500 > > e.g. i have a number 3 applications that are or will be obsoleted and is > expected to return a 500 to all callers who try to access it. > > so when

  1   2   >