|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
[?] get params to the url rewriteGuys, 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!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "UrlRewrite" group. To post to this group, send email to urlrewrite@... To unsubscribe from this group, send email to urlrewrite+unsubscribe@... For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: [?] get params to the url rewriteHave a problem here, kinda novice in url rewriting. Need a rewriting rule from /oc/TaskStart.do?method=selectTaskMethod&mid=91023909520346476 to /methods/oc/91023909520346476Are 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.petuhov@...> wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "UrlRewrite" group. To post to this group, send email to urlrewrite@... To unsubscribe from this group, send email to urlrewrite+unsubscribe@... For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: get params to the url rewriteHi, 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...@...> 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...@...> 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!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "UrlRewrite" group. To post to this group, send email to urlrewrite@... To unsubscribe from this group, send email to urlrewrite+unsubscribe@... For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: get params to the url rewritee.g. Here is my rule Changing your rule to the underneath should work as expected - <rule> <from>^/test/(.*)\?(.*)$</from> <to>/test.do?id=$1&$2</to> </rule> To make this work, don't forget to add "use-query-string=true" in the root node of your urlrewrite.xml file. Cheers Avlesh On Mon, Nov 9, 2009 at 4:02 PM, baby <babybaby409@...> wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "UrlRewrite" group. To post to this group, send email to urlrewrite@... To unsubscribe from this group, send email to urlrewrite+unsubscribe@... For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |