Short URLs in WOApp (was Re: How many WO business in the world ?)

Denis Frolov <[email protected]> Wed, 09 Nov 2005 10:40:17 +0300
Newsgroups gmane.comp.web.webobjects.general
Message-ID <BF978291.7FB64%[email protected]>
Gino,

Sorry for answering to public mail list, but I got the following error
report from your mail server when tried to answer privately:

<[email protected]>: Name service error for
name=base-enterprise.co.uk
    type=A: Host found but no data record of requested type

on 11/8/05 9:47 PM, Gino Pacitti at [email protected] wrote:

> I had a look at the site and it looks really cool.

Thanks.
 
> We work in WO too.
> I noticed that the site does not seem to use the /cgi-bin/WebObjects/
> appname.woa uri
> How do you do that?

We use a regexp replace in Application.dispatchRequest() in combination with
mod_rewirte.

Here is the code snippent:

String result = content;
String stringToStrip =
NSPathUtilities.stringByAppendingPathComponent(request.adaptorPrefix(),
request.applicationName()+".woa");
result = ERXStringUtilities.replaceStringByStringInString(stringToStrip +
"/wa","",result);
result = ERXStringUtilities.replaceStringByStringInString(stringToStrip +
"/wo","/wo",result);

and here are the corresponding mod_rewrite rules:

RewriteRule ^/$ /cgi-bin/WebObjects/AppName.woa [PT,L]
RewriteRule ^/wo/(.*) /cgi-bin/WebObjects/ AppName.woa/wo/$1 [PT,L]
RewriteCond $1 !^images/.*
RewriteCond $1 !^cgi-bin/WebObjects/.*
RewriteCond $1 !^WebObjects/.*
RewriteCond $1 !^favicon.ico
RewriteCond $1 !^robots.txt
RewriteRule ^/(.*) / cgi-bin/WebObjects/ AppName.woa/wa/$1 [PT,L]

> Gino
> On 8 Nov 2005, at 18:38, Denis Frolov wrote:
> 
>> http://www.designmaximum.com - we are located in Russia and specialize
>> exclusively on WO-based solutions, most notably http://
>> www.legalsounds.com -
>> an iTMS-like online music distribution service which is 100% WO.
>> 
>> on 11/3/05 7:01 PM, Luc Bussières at [email protected] wrote:
>> 
>>> Hi everyone,
>>> 
>>> I am aware to know how many business development are using
>>> WebObjects in USA
>>> or Canada (and in the World too...) Not those who are developing
>>> in house
>>> but those who are selling solutions using WO.
>>> 
>>> We are in Montreal and we have 7 WO developers at full time but we
>>> seem to
>>> be alone in this world, I try using Google to find who is using WO
>>> as a
>>> primary development tools for their clients but.... (I know Global
>>> Village
>>> in BC...)
>>> 
>>> Maybe most of you are consultant ?
>>> 
>>> I hope this is a WebObjects-Talk topics.
>>> 
>>> Regards,
>>> 
>>> Luc
>>> http://os.ca
>>> 
>>> 
>>> _______________________________________________
>>> WebObjects-talk mailing list
>>> [email protected]
>>> http://www.omnigroup.com/mailman/listinfo/webobjects-talk
>>> 
>> 
>> 
>> ---
>> Denis Frolov
>> Media Agency Design Maximum
>> 
>> Tel: +7 863 2648211
>> Fax: +7 863 2645229
>> Web: http://www.designmaximum.com
>> 
>> 
>> _______________________________________________
>> WebObjects-talk mailing list
>> [email protected]
>> http://www.omnigroup.com/mailman/listinfo/webobjects-talk
>> 
> 
> 
> 


---
Denis Frolov
Media Agency Design Maximum

Tel: +7 863 2648211
Fax: +7 863 2645229
Web: http://www.designmaximum.com