Re: [us...@httpd] RewriteRule problem

2009-03-18 Thread André Warnier
Campbell, Lance wrote: RewriteCond %{QUERY_STRING} ^id=(.*) [NC] RewriteRule ^/abc$ /efg/%1 [L] I have tried the above but it still gives me a file not found for abc. RewriteCond %{QUERY_STRING} ^id=(.*) [NC] RewriteRule ^/abc /efg/%1 [L] This also did not work. R

Re: [us...@httpd] RewriteRule problem

2009-03-18 Thread André Warnier
Campbell, Lance wrote: So now I have the following: RewriteCond %{QUERY_STRING} ^abc?id=(.*) [NC] RewriteRule ^abc /efg/%1 [L] This is irrelevant for the second time, because the others gave you the correct solution, but you are still making an error in your regexp : ^abc?id= does not match

RE: [us...@httpd] RewriteRule problem

2009-03-18 Thread Campbell, Lance
ssage- From: Campbell, Lance [mailto:la...@illinois.edu] Sent: Wednesday, March 18, 2009 3:03 PM To: users@httpd.apache.org Subject: RE: [us...@httpd] RewriteRule problem So now I have the following: RewriteCond %{QUERY_STRING} ^abc?id=(.*) [NC] RewriteRule ^abc /efg/%1 [L] It still does not

Re: [us...@httpd] RewriteRule problem

2009-03-18 Thread Eric Covener
> Also at a higher level, if your users type in /abc/def then you want > to internally redirect to /abc?id=def, then you don't even want to > match against a query string.  You're implementing the opposite, where > you identify /abc?id=def and react to it. Reconsidering -- OP is a little ambiguous

Re: [us...@httpd] RewriteRule problem

2009-03-18 Thread Eric Covener
On Wed, Mar 18, 2009 at 5:02 PM, Campbell, Lance wrote: > So now I have the following: > > RewriteCond %{QUERY_STRING} ^abc?id=(.*)  [NC] "abc" isn't part of the query string in your example > RewriteRule ^abc /efg/%1  [L] This depends on http://wiki.apache.org/httpd/RewriteContext Also at a h

RE: [us...@httpd] RewriteRule problem

2009-03-18 Thread Anthony J. Biacco
ssage- From: Campbell, Lance [mailto:la...@illinois.edu] Sent: Wednesday, March 18, 2009 3:03 PM To: users@httpd.apache.org Subject: RE: [us...@httpd] RewriteRule problem So now I have the following: RewriteCond %{QUERY_STRING} ^abc?id=(.*) [NC] RewriteRule ^abc /efg/%1 [L] It still does not wor

RE: [us...@httpd] RewriteRule problem

2009-03-18 Thread Campbell, Lance
: Wednesday, March 18, 2009 3:40 PM To: users@httpd.apache.org Subject: Re: [us...@httpd] RewriteRule problem On Wed, Mar 18, 2009 at 4:38 PM, Campbell, Lance wrote: > RewriteRule ^/abc?id=(.*)   /efg/$1 You need to deal with the query string in a RewriteCond. http://wiki.apache.org/ht

Re: [us...@httpd] RewriteRule problem

2009-03-18 Thread André Warnier
Eric Covener wrote: On Wed, Mar 18, 2009 at 4:38 PM, Campbell, Lance wrote: RewriteRule ^/abc?id=(.*) /efg/$1 You need to deal with the query string in a RewriteCond. http://wiki.apache.org/httpd/RewriteQueryString Eric is of course right, above here. But even if .. I wanted to point out

RE: [us...@httpd] RewriteRule problem

2009-03-18 Thread Anthony J. Biacco
--- From: André Warnier [mailto:a...@ice-sa.com] Sent: Wednesday, March 18, 2009 2:37 PM To: users@httpd.apache.org Subject: Re: [us...@httpd] RewriteRule problem Campbell, Lance wrote: > I want to do convert the below dynamic url to a static url: > > > > http://acme

Re: [us...@httpd] RewriteRule problem

2009-03-18 Thread André Warnier
Campbell, Lance wrote: I want to do convert the below dynamic url to a static url: http://acme.com/abc?id=123 To: http://acme.com/efg/123 I have tried the following: RewriteRule ^/abc?id=(.*) /efg/$1 Try: RewriteRule ^/abc\?id=(.*) /efg/$1 Well, actually maybe not

Re: [us...@httpd] RewriteRule problem

2009-03-18 Thread Eric Covener
On Wed, Mar 18, 2009 at 4:38 PM, Campbell, Lance wrote: > RewriteRule ^/abc?id=(.*)   /efg/$1 You need to deal with the query string in a RewriteCond. http://wiki.apache.org/httpd/RewriteQueryString -- Eric Covener cove...@gmail.com --

[us...@httpd] RewriteRule problem

2009-03-18 Thread Campbell, Lance
I want to do convert the below dynamic url to a static url: http://acme.com/abc?id=123 To: http://acme.com/efg/123 I have tried the following: RewriteRule ^/abc?id=(.*) /efg/$1 I get an error in my apache log: File does not exist: /apacheDocs/http/acme.com/abc I ha