On Mon, Nov 9, 2009 at 4:02 PM, baby <babybaby
...@gmail.com> wrote:
> Hi,
> I am new to URL re-writing. I have the same question. How can i pass
> the query parameters to the actual URL
> e.g. Here is my rule
> <rule>
> <from>^/([A-Za-z0-9]+)$</from>
> <to>/test.do?id=$1</to>
> </rule>
> now when user provide the URL like :
> http://localhost:8080/test/prodcut001?code=001&name=test
> then how can i pass "code=001&name=test" in the actual URL i.e. /
> test.do?id=product001&code=001&name=test
> Thanks,
> Baby
> On Nov 6, 7:17 am, Avlesh Singh <avl...@gmail.com> wrote:
> > > Have a problem here, kinda novice in url rewriting. Need a rewriting
> rule
> > > from /oc/TaskStart.do?method=selectTaskMethod&mid=91023909520346476 to
> > > /methods/oc/91023909520346476
> > Are you sure that you want it written that way? Use cases are generally
> the
> > reverse!
> > Anways,
> > if your answer is yes -
> > <from>/oc/TaskStart.do\?method=selectTaskMethod&mid=(.*)</from>
> > <to type="permanent-redirect" last="true">/methods/oc/$1</to>
> > Don't forget to turn on the "use-query-string" parameter in the root
> node.
> > if reverse if what you wanted to do -
> > <from>/methods/oc/(.*)</from>
> > <to type="permanent-redirect"
> > last="true">/oc/TaskStart.do\?method=selectTaskMethod&mid=$1</to>
> > Cheers
> > Avlesh
> > On Thu, Nov 5, 2009 at 1:58 PM, Roublard <alexey.petu...@gmail.com>
> wrote:
> > > Guys, hi!
> > > Have a problem here, kinda novice in url rewriting. Need a rewriting
> > > rule from
> > > /oc/TaskStart.do?method=selectTaskMethod&mid=91023909520346476
> > > to
> > > /methods/oc/91023909520346476
> > > I've tried a lot of reqexps but still have no luck to create it. Could
> > > you please provide me an example?
> > > Looks like it could be simething like
> > > <rule>
> > > <name>redirect method selector</name>
> > > <from>^/oc/TaskStart.do?method=selectTaskMethod&mid=(.+)$</
> > > from>
> > > <to type="permanent-redirect" last="true">/methods/oc/$1</to>
> > > </rule>
> > > But it doesn't work of course :(
> > > Thanks in advance!!!