On the apps I use I like clean URLs, I've been using alot of ERRest to help
as well.
For rewrite rules I use a more complicated rewrite so that I can write
ERRest routes like server.com/AppName/Route/Whatever instead of
server.com/AppName/ra/Route/Whatever:
RewriteRule
^AppName/([0-9]*/)?(?!(?:[0-9]*/)?ajax/|(?:[0-9]*/)?wis/|(?:[0-9]*/)?_wr_/|(?:[0-9]*/)?_sl_/|(?:[0-9]*/)?wa/|(?:[0-9]*/)?ra/|(?:[0-9]*/)?womp/|(?:[0-9]*/)?ja/|(?:[0-9]*/)?wo/|(?:[0-9]*/)?push/|(?:[0-9]*/)?wr/|(?:[0-9]*/)?ws/|(?:[0-9]*/)?erxadm/|(?:[0-9]*/?)?$)(.*)$
/cgi-bin/WebObjects/AppName.woa/$1ra/$2 [NC,PT,L]
RewriteRule
^AppName/([0-9]*/)?(ajax/|wis/|_wr_/|_sl_/|wa/|ra/|womp/|ja/|wo/|push/|wr/|ws/|erxadm/|(?:[0-9]*/))(.*)$
/cgi-bin/WebObjects/AppName.woa/$1$2$3 [NC,PT,L]
RewriteRule ^AppName(/[0-9]*)?$ /cgi-bin/WebObjects/AppName.woa [NC,PT,L]
The rewrite properties are simple though:
er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/AppName.woa
-er.extensions.ERXApplication.replaceApplicationPath.replace=/AppName
Then to get rid of the session ID in the url in my session class I have:
@Override
public void awake() {
super.awake();
setStoresIDsInCookies(true);
setStoresIDsInURLs(false);
}
@Override
public String domainForIDCookies() {
return ERXApplication.isDevelopmentModeSafe() ?
super.domainForIDCookies() : "/" + "AppName" ;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]