|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Beginner questionHello I just found urlrewrite and tested it with Struts 2. This is my rule <rule> <from>/test/status/</from> <to type="redirect">%{context-path}/HelloWorld.action</to> </rule> So when I go to http://localhost/test/status/ I'm redirected to Struts HelloWorld.action which is ok but then the url changes to this http://localhost/HelloWorld.action but I want the url to remain like this http://localhost/test/status/ --~--~---------~--~----~------------~-------~--~----~ 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: Beginner questionRemove the type="redirect" attribute from your <to> part of the rule. The default value is "forward", and I guess that is what you want. Cheers Avlesh On 10/24/09, Enrique <enrique.garcia.ceja@...> wrote: > > Hello I just found urlrewrite and tested it with Struts 2. > > This is my rule > > <rule> > <from>/test/status/</from> > <to type="redirect">%{context-path}/HelloWorld.action</to> > </rule> > > So when I go to http://localhost/test/status/ I'm redirected to > Struts HelloWorld.action which is ok > but then the url changes to this http://localhost/HelloWorld.action > but I want the url to remain like this http://localhost/test/status/ > > > > --~--~---------~--~----~------------~-------~--~----~ 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: Beginner questionThank you. That did the trick!! On Oct 24, 6:30 am, Avlesh Singh <avl...@...> wrote: > Remove the type="redirect" attribute from your <to> part of the rule. > The default value is "forward", and I guess that is what you want. > > Cheers > Avlesh > > On 10/24/09, Enrique <enrique.garcia.c...@...> wrote: > > > > > Hello I just found urlrewrite and tested it with Struts 2. > > > This is my rule > > > <rule> > > <from>/test/status/</from> > > <to type="redirect">%{context-path}/HelloWorld.action</to> > > </rule> > > > So when I go tohttp://localhost/test/status/I'm redirected to > > Struts HelloWorld.action which is ok > > but then the url changes to thishttp://localhost/HelloWorld.action > > but I want the url to remain like thishttp://localhost/test/status/ 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 |