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

2009-03-18 Thread Eric Covener
On Wed, Mar 18, 2009 at 4:38 PM, Campbell, Lance la...@illinois.edu 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

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

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

2009-03-18 Thread Anthony J. Biacco
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.com/abc?id=123 To: http://acme.com

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 la...@illinois.edu 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

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 la...@illinois.edu wrote: RewriteRule ^/abc?id=(.*)   /efg/$1 You need to deal with the query string in a RewriteCond. http

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

2009-03-18 Thread Anthony J. Biacco
- 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 work. I

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

2009-03-18 Thread Eric Covener
On Wed, Mar 18, 2009 at 5:02 PM, Campbell, Lance la...@illinois.edu 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

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 so

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

2009-03-18 Thread Campbell, Lance
- 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 work

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

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.