On 07.10.2008, at 13:04, Xavier Destombes wrote:

Hello Guido,
I'm jumping on this answer to ask you:
Do you have a sample code that use wonder url rewriting feature?
When you decode using Apache rewrite, are you using a script or a static rewriting rule?
:)

I have this in my application class:

/**
 * Make URLs nicer
 */
public String _rewriteURL(String url) {
if (ERXProperties .booleanForKeyWithDefault("net.events.Designer.shouldRewriteUrls", false)) {
    url = url.replaceAll("/cgi-bin/WebObjects/Designer.woa/", "/");
  }
  return url;
}

and this in my httpd.conf:

RewriteRule ^(/-{0,1}[0-9]*/*(wo|wr|wa|womp|wis|ajax)/.*)$ /cgi-bin/WebO
bjects/Designer.woa$1 [PT]

(one line) as a static rewrite rule. This produces the URLs seen on my private web site <http://www.event-s.net>. I was sometimes thinking of making them a bit more sophisticated, but never got to it.

cug

--
Real World WebObjects Bootcamp at the Big Nerd Ranch:
http://www.bignerdranch.com/classes/real-world_webobjects.shtml

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to