Re: Shorter URL
Re: Shorter URL
- Subject: Re: Shorter URL
- From: Chuck Hill <email@hidden>
- Date: Wed, 8 Mar 2006 20:01:52 -0800
Hi Dave,
On Mar 8, 2006, at 7:56 PM, Dave Elsner wrote:
I know this issue has been covered many times before but I still
can't seem to find a solution to:
How to remove the "cgi-bin/WebObjects/appName.woa" from the URL
permanently ?
I have set up Apaches modRewrite so I can navigate to the Domain
name, but as soon as I navigate from the front page the site the
URL goes back to using " cgi-bin/WebObjects/appName.woa" How came I
change the application so that all hyperlinks and form submit
return a URL like:
http://mydomain/appname.woa/blahblah that will be translated by
apache to http://mydomain/cgi-bin/WebObjects/appname.woa/blahblah
My rewrite rule would look some thing like: RewriteRule ^/
appname.woa.* /cgi-bin/WebObjects/appname.woa$1 [L,PT]
Can I do this in appendToResponce ? pageWithName? or changing the
Monitors path to the WO Adaptor?
In a nutshell, you have to generate the URLs yourself. There are
many ways of doing this:
1. Create a class that generates the URL and use this with the href
bindings on the components
2. Create a custom WOContext subclass to generate the URLS you need
3. Use regex to find and change the URLs in dispatchRequest in
Application (probably the best place)
4. Do something like this: http://www.jewelryluv.com/fashion/
pageWithName/ModRewrite/
Chuck
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Shorter URL (From: Dave Elsner <email@hidden>) |