• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects


  • Subject: Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 09 Dec 2004 08:16:38 -0800

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

  • Follow-Ups:
    • Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
      • From: Brendan Duddridge <email@hidden>
    • Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
      • From: Olav Anderson <email@hidden>
References: 
 >Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects (From: Brendan Duddridge <email@hidden>)

  • Prev by Date: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
  • Next by Date: Practical WebObjects Authentification scheme
  • Previous by thread: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
  • Next by thread: Re: Apache Rewrite [L,PT] vs [L,R], sessions, and WebObjects
  • Index(es):
    • Date
    • Thread