Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
- Subject: Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
- From: Brendan Duddridge <email@hidden>
- Date: Thu, 09 Dec 2004 10:46:45 -0700
Awesome! Thanks Chuck!
Hmm... However, if I'm accessing say an admin application and a customer
application with the same browser, will there be a conflict from the wosid
and woinst between applications? Can the admin application still see the
cookie at the more specific path relative to the application while the
customer application uses the more generic '/' path?
Thanks,
___________________________
Brendan Duddridge
ClickSpace Interactive Inc.
Suite L100
239 - 10th Ave SE
Calgary, AB T2G 0V9
Canada
(403) 277-5591
http://www.clickspace.com/
> From: Chuck Hill <email@hidden>
> Date: Thu, 09 Dec 2004 08:16:38 -0800
> To: Brendan Duddridge <email@hidden>,
> "email@hidden" <email@hidden>
> Subject: Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
>
> Simple! Add this method to Session:
>
> /**
> * Despite the name, this is actually the path used in the cookies for
> the session ID and instance number. Returning just the root '/' ensures
> that the cookies are always sent for any request to the site. This was
> needed so that they are sent with URLs which will be rewritten. Note that
> super.domainForIDCookies() would return: /cgi-bin/WebObjects/App.woa
> */
> public String domainForIDCookies()
> {
> return "/";
>
>
>
> Chuck
>
>
> At 09:06 AM 09/12/2004 -0700, Brendan Duddridge wrote:
>> Hi,
>>
>> We use Apache rewrite rules to convert our WebObjects URLs into simpler
>> URLs. However, if I use [L, PT] (last, pass through) instead of [L, R]
>> (last, redirect) in my rewrite rules, WebObjects creates a new session for
>> each request.
>>
>> Is there a workaround for this? The problem is that if I use [L, R] in my
>> rewrite rule, a 302 redirect is generated for every click to our sites.
>> That¹s like double the number of hits to our web server. I have the session
>> ID set in a cookie (and not in the URL), so you would think that WebObjects
>> would still be able to read that and direct requests to the same instance
>> and session for subsequent requests.
>>
>> I¹m kind of thinking of a possible workaround right now. It may have to do
>> with the default path that WO uses when it sets the woinst and wosid
>> cookies. I think the default path is /cgi-bin/WebObjects/WOApp.woa. Perhaps
>> there¹s a way to change it to /¹ just like you can when you create your own
>> WOCookie.
>>
>> Does anyone have any ideas about this or workarounds?
>>
>>
>> Thanks,
>>
>> ___________________________
>>
>> Brendan Duddridge
>>
>> ClickSpace Interactive Inc.
>> Suite L100
>> 239 - 10th Ave SE
>> Calgary, AB T2G 0V9
>> Canada
>> (403) 277-5591
>> http://www.clickspace.com/
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
> e.net
>>
>> This email sent to email@hidden
>>
>>
>
> --
>
> Chuck Hill email@hidden
> Global Village Consulting Inc. http://www.global-village.net
>
_______________________________________________
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