Re: _rewriteURL with query parameter
Chuck Hill <[email protected]> Mon, 12 May 2014 23:09:42 +0000
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <CF96A23D.C92DA%[email protected]> |
Hi Anil, In my application, I ended up writing a factory to produce the custom URLs that I needed (it got kind of complicated after a point). I think that you will need to replace/implement _rewriteURL in your Application class. I think the pattern replacing there now will not be sufficient for your needs. Chuck On 2014-05-09, 3:39 PM, "Anil Bajaj" wrote: Hi Chuck, My rule is: RewriteRule ^/(.*)$ /cgi-bin/WebObjects/Foodie.woa/wa/m?m=$1 [L,PT] The initial redirect is fine, it's just the links on the resulting page, which are also direct action links going to the same page, they end up displaying in the longer form. Anil On May 9, 2014, at 3:25 PM, Chuck Hill <[email protected]<mailto:[email protected]>> wrote: Hi Anil, It should not do that, it sounds like you might be redirecting. My rules look like this: # Any hit to /uniqname/foo gets passed to a section RewriteRule ^/(.+)/(.+) /cgi-bin/WebObjects/GVCSiteMaker.woa/wa/displaySection?site=$1§ion=$2 [last,passthrough] And preserve what the user put into the URL. What do your rules look like? Chuck On 2014-05-09, 3:19 PM, "Anil Bajaj" wrote: Hi, I've setup a mod_rewrite rule to rewrite a simple URL to a WebObjects direct action, like mydomain.com/<http://mydomain.com/><username>to mydomain.com/cgi-bin/WebObjects/MyApp.woa/wa/profile?uid=<http://mydomain.com/cgi-bin/WebObjects/MyApp.woa/wa/profile?uid=><username> This works fine except the browser displays the long URL, instead of the short URL, as expected. Is there anyway, using either ERXApplication._rewriteURL or ERXApplication.replaceApplicationPath properties, to display the short URL that includes the username param that was originally passed into the direct action query and display something like mydomain.com/<http://mydomain.com/><username>. All the documentation/examples I've seen are of the type where replaced URL is always static i.e the App name. Thanks, Anil Bajaj ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce _______________________________________________ Wonder-disc mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/wonder-disc ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Wonder-disc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wonder-disc