Re: apache RewriteEngine

2012-01-31 Thread Jesse Tayler
got it!

thanks --

some confusion over ssl, https vs. http and perhaps a few little things, all in 
order once I look after sleeping.

I'd guess I should have a rule that prevents the site from being accessed 
without SSL ?

I'm having a spot of trouble accessing some screens, an error or perhaps a 
cookie issue.

my session avoids session urls and uses session cookies if that matters.

I used this set of rules which seems to work well.



RewriteRule ^/post /apps/WebObjects/WOMan.woa/wa/post [last,passthrough]
RewriteRule ^/login /apps/WebObjects/WOMan.woa/wa/login 
[last,passthrough]
RewriteRule ^/join /apps/WebObjects/WOMan.woa/wa/signup 
[last,passthrough]

RewriteRule ^/woman(.*)$ /apps/WebObjects/WOMan.woa$1 [PT,L]


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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-30 Thread Jesse Tayler
you mean to see if I can write other rules that simply redirect static pages or 
whatever?


yes, I'll do some of that tonight, and perhaps the mistakes I've made will 
reveal themselves --



On Jan 29, 2012, at 10:31 PM, Jesse Tayler wrote:

 
 On Jan 29, 2012, at 10:22 PM, Pascal Robert wrote:
 
 Any errors in the logs? And you can enable mod_rewrite logging with:
 
 RewriteLog /var/log/httpd/rewrite.log
 RewriteLogLevel 3
 
 none, even after apache created the empty logfile when I turned the rule on.
 
 suggests the modrewrite isn't working afterall?
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
 
 This email sent to jtay...@oeinc.com

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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-30 Thread Pascal Robert

Le 2012-01-30 à 09:43, Jesse Tayler a écrit :

 you mean to see if I can write other rules that simply redirect static pages 
 or whatever?

Exact, just to see if it's mod_rewrite that is not working at all (which seems 
to be the problem since logging don't work).

 
 yes, I'll do some of that tonight, and perhaps the mistakes I've made will 
 reveal themselves --
 
 
 
 On Jan 29, 2012, at 10:31 PM, Jesse Tayler wrote:
 
 
 On Jan 29, 2012, at 10:22 PM, Pascal Robert wrote:
 
 Any errors in the logs? And you can enable mod_rewrite logging with:
 
 RewriteLog /var/log/httpd/rewrite.log
 RewriteLogLevel 3
 
 none, even after apache created the empty logfile when I turned the rule on.
 
 suggests the modrewrite isn't working afterall?
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
 
 This email sent to jtay...@oeinc.com
 


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

This email sent to arch...@mail-archive.com

apache RewriteEngine

2012-01-29 Thread Jesse Tayler

I'm confused about my apache rules.

I have a virtual host setup with ssl

VirtualHost mydomain.com:443

Which works fine, but now I wanted to put in basic shortcuts like this

RewriteEngine On

RewriteRule ^/signup /apps/WebObjects/WOMan.woa/wa/signup 
[last,passthrough]


I use a standard rule which I guess ensures html requests don't get confused

# Keep mod_rewrite away from DocRoot requests
Directory /var/www/html
IfModule mod_rewrite.c
RewriteEngine Off
/IfModule
/Directory



what rules and setups should I be using to get my basic APIs redirecting to the 
proper direct actions etc?

can anyone cut a few slices of apache.conf files for me?

thanks!



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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread Fabian Peters
Hi Jesse,

Am 29.01.2012 um 18:40 schrieb Jesse Tayler:

 I'm confused about my apache rules.
 
 I have a virtual host setup with ssl
 
 VirtualHost mydomain.com:443
 
 Which works fine, but now I wanted to put in basic shortcuts like this
 
RewriteEngine On
 
RewriteRule ^/signup /apps/WebObjects/WOMan.woa/wa/signup 
 [last,passthrough]

In a basic way, this should work. There are potential complications like 
instances IDs and query strings though, see below.

 I use a standard rule which I guess ensures html requests don't get confused
 
 # Keep mod_rewrite away from DocRoot requests
Directory /var/www/html
IfModule mod_rewrite.c
RewriteEngine Off
/IfModule
/Directory

This may or may not affect your rewrites, easiest to remove it for testing and 
put it back in.

 
 what rules and setups should I be using to get my basic APIs redirecting to 
 the proper direct actions etc?
 
 can anyone cut a few slices of apache.conf files for me?

Hard to say, without knowing what you want to achieve. Some basic rewrites from 
a live application:

# root rewrite
RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]

RewriteRule ^/(de|en|es|fr)/(.*)$ /$2?lang=$1 [N,QSA]

RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
[L,PT,QSA]
RewriteRule ^/(\d*?/?)upload(.*)$ /cgi-bin/WebObjects/App.woa/$1upload$2 
[L,PT,QSA]
RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
[L,PT,QSA]
RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
[L,PT,QSA]
RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 [L,PT,QSA]

They work for me, but I'm by no means a rewrite expert...

Fabian

 thanks!
 
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
 
 This email sent to lists.fab...@e-lumo.com


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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread Jesse Tayler

oh thanks fabian! 

maybe just what I was looking for -- 

the site is like twitter, so there's standard urls to reach a user profile, or 
a post and those urls should be short, of course.

 They work for me, but I'm by no means a rewrite expert...

rewrite expert? ick! who would want to be that!! 

I mean, the syntax looks like someone was drunk while slapping their hands on 
the keypad...

On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:

# root rewrite
RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 

ah, so this basically translates anything into a full woa I guess?

RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
 [L,PT,QSA]
RewriteRule ^/(\d*?/?)upload(.*)$ /cgi-bin/WebObjects/App.woa/$1upload$2 
 [L,PT,QSA]

I guess those two above translate standard ajax and file upload calls in the 
same way?

RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
 [L,PT,QSA]
RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 [L,PT,QSA]

and so, these I guess translate calls from errest, direct actions and basic 
components?

I can test around with these a bit, but I'm not certain I understand what they 
are doing --

all cool, but you must also have some code in your app to return short urls 
during deployment?

I used to have a menu item that used deployment urls for things like signup, 
but used component urls locally during development, but I am guessing with 
WOnder I might have a different approach there?



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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread Fabian Peters

Am 29.01.2012 um 19:44 schrieb Jesse Tayler:

 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user profile, 
 or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their hands on 
 the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
   # root rewrite
   RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?

Yes

   RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
 [L,PT,QSA]
   RewriteRule ^/(\d*?/?)upload(.*)$ /cgi-bin/WebObjects/App.woa/$1upload$2 
 [L,PT,QSA]
 
 I guess those two above translate standard ajax and file upload calls in the 
 same way?

Yes. The upload bit is for the AjaxFlexibleFileUpload IIRC.

   RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
   RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
 [L,PT,QSA]
   RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 [L,PT,QSA]
 
 and so, these I guess translate calls from errest, direct actions and basic 
 components?

DAs, component actions and the ERXStaticResourceRequestHandler - which you 
won't need in deployment I think. This was copied from my development apache 
config.

 I can test around with these a bit, but I'm not certain I understand what 
 they are doing --

   RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]

The first group (\d*?/?) checks whether there's an instance ID in the URL and 
appends that as $1. You might not need that. The second group (.*) takes 
the rest and appends it as $2.

 all cool, but you must also have some code in your app to return short urls 
 during deployment?
 
 I used to have a menu item that used deployment urls for things like signup, 
 but used component urls locally during development, but I am guessing with 
 WOnder I might have a different approach there?

Yes, you can set er.extensions.ERXApplication.replaceApplicationPath.pattern 
and er.extensions.ERXApplication.replaceApplicationPath.replace in your 
properties and use 

public String _rewriteURL(String url) {
url = super._rewriteURL(url);
...
return url;
}

in your ERXApplication subclass if you need more special things.

Fabian
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread Jesse Tayler

A quick test, I wrote a rule like yours

   RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 [L,PT,QSA]

that I'd expect to redirect a URL like this:

http://mydomain.com/wa/entrance

to

http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance


aside from using SSL port :443 I don't see much there, I just added a simple 
virtual host to apache.conf.

I'm either misunderstanding the URL that should trigger this rule, or it's not 
working in a way I'm unsure how to debug -

thoughts?




On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:

 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user profile, 
 or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their hands 
 on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
  # root rewrite
  RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
  RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
 [L,PT,QSA]
  RewriteRule ^/(\d*?/?)upload(.*)$ /cgi-bin/WebObjects/App.woa/$1upload$2 
 [L,PT,QSA]
 
 I guess those two above translate standard ajax and file upload calls in the 
 same way?
 
 Yes. The upload bit is for the AjaxFlexibleFileUpload IIRC.
 
  RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
  RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
 [L,PT,QSA]
  RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 [L,PT,QSA]
 
 and so, these I guess translate calls from errest, direct actions and basic 
 components?
 
 DAs, component actions and the ERXStaticResourceRequestHandler - which you 
 won't need in deployment I think. This was copied from my development apache 
 config.
 
 I can test around with these a bit, but I'm not certain I understand what 
 they are doing --
 
  RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 
 The first group (\d*?/?) checks whether there's an instance ID in the URL 
 and appends that as $1. You might not need that. The second group (.*) 
 takes the rest and appends it as $2.
 
 all cool, but you must also have some code in your app to return short urls 
 during deployment?
 
 I used to have a menu item that used deployment urls for things like signup, 
 but used component urls locally during development, but I am guessing with 
 WOnder I might have a different approach there?
 
 Yes, you can set er.extensions.ERXApplication.replaceApplicationPath.pattern 
 and er.extensions.ERXApplication.replaceApplicationPath.replace in your 
 properties and use 
 
public String _rewriteURL(String url) {
url = super._rewriteURL(url);
   ...
return url;
}
 
 in your ERXApplication subclass if you need more special things.
 
 Fabian


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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread George Domurot
It looks like these options may be over complicating things.  While you can get 
super fancy with rewrites, I've found it's easiest to use Wonder's built-in 
support and one singe rule to get deployed.  If you need additional rules, you 
can stack them in above this one, otherwise this configuration should take care 
of you:

1) in your Resources/Properties file add (to get Wonder to rewrite during 
deployment):

# Apache Deployment Rewrite
er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa
er.extensions.ERXApplication.replaceApplicationPath.replace=/myapp


2) In your VirtualHost config, include (for Apache to reverse Wonder's rewrite 
from above):

IfModule mod_rewrite.c
RewriteEngine On
RewriteRule ^/myapp(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
/IfModule

-G

On Jan 29, 2012, at 1:36 PM, Jesse Tayler wrote:

 
 A quick test, I wrote a rule like yours
 
   RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 [L,PT,QSA]
 
 that I'd expect to redirect a URL like this:
 
 http://mydomain.com/wa/entrance
 
 to
 
 http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance
 
 
 aside from using SSL port :443 I don't see much there, I just added a simple 
 virtual host to apache.conf.
 
 I'm either misunderstanding the URL that should trigger this rule, or it's 
 not working in a way I'm unsure how to debug -
 
 thoughts?
 
 
 
 
 On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:
 
 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user profile, 
 or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their hands 
 on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
 # root rewrite
 RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
 RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)upload(.*)$ /cgi-bin/WebObjects/App.woa/$1upload$2 
 [L,PT,QSA]
 
 I guess those two above translate standard ajax and file upload calls in 
 the same way?
 
 Yes. The upload bit is for the AjaxFlexibleFileUpload IIRC.
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 [L,PT,QSA]
 
 and so, these I guess translate calls from errest, direct actions and basic 
 components?
 
 DAs, component actions and the ERXStaticResourceRequestHandler - which you 
 won't need in deployment I think. This was copied from my development apache 
 config.
 
 I can test around with these a bit, but I'm not certain I understand what 
 they are doing --
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 
 The first group (\d*?/?) checks whether there's an instance ID in the URL 
 and appends that as $1. You might not need that. The second group (.*) 
 takes the rest and appends it as $2.
 
 all cool, but you must also have some code in your app to return short urls 
 during deployment?
 
 I used to have a menu item that used deployment urls for things like 
 signup, but used component urls locally during development, but I am 
 guessing with WOnder I might have a different approach there?
 
 Yes, you can set er.extensions.ERXApplication.replaceApplicationPath.pattern 
 and er.extensions.ERXApplication.replaceApplicationPath.replace in your 
 properties and use 
 
   public String _rewriteURL(String url) {
   url = super._rewriteURL(url);
  ...
   return url;
   }
 
 in your ERXApplication subclass if you need more special things.
 
 Fabian
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/george%40boxofficetickets.com
 
 This email sent to geo...@boxofficetickets.com


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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread David Avendasora

On Jan 30, 2012, at 2:44 AM, Jesse Tayler wrote:

 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their hands on 
 the keypad…

I am _so_ glad you said hands.

Dave



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

This email sent to arch...@mail-archive.com

Re: apache RewriteEngine

2012-01-29 Thread Jesse Tayler
ah, let me see if I follow

when I use a rule like

RewriteRule ^/myapp(.*)$ /apps/WebObjects/MyApp.woa$1 [PT,L]

a url with my myapp in it, would expand and all I'd need is the /wa/entrance or 
something like so?

http://my.domain/myapp/wa/entrance

am I following there?



On Jan 29, 2012, at 6:39 PM, George Domurot wrote:

 It looks like these options may be over complicating things.  While you can 
 get super fancy with rewrites, I've found it's easiest to use Wonder's 
 built-in support and one singe rule to get deployed.  If you need additional 
 rules, you can stack them in above this one, otherwise this configuration 
 should take care of you:
 
 1) in your Resources/Properties file add (to get Wonder to rewrite during 
 deployment):
 
 # Apache Deployment Rewrite
 er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa
 er.extensions.ERXApplication.replaceApplicationPath.replace=/myapp
 
 
 2) In your VirtualHost config, include (for Apache to reverse Wonder's 
 rewrite from above):
 
IfModule mod_rewrite.c
RewriteEngine On
   RewriteRule ^/myapp(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
/IfModule
 
 -G
 
 On Jan 29, 2012, at 1:36 PM, Jesse Tayler wrote:
 
 
 A quick test, I wrote a rule like yours
 
  RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 [L,PT,QSA]
 
 that I'd expect to redirect a URL like this:
 
 http://mydomain.com/wa/entrance
 
 to
 
 http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance
 
 
 aside from using SSL port :443 I don't see much there, I just added a simple 
 virtual host to apache.conf.
 
 I'm either misunderstanding the URL that should trigger this rule, or it's 
 not working in a way I'm unsure how to debug -
 
 thoughts?
 
 
 
 
 On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:
 
 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user 
 profile, or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their hands 
 on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
 # root rewrite
 RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
 RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)upload(.*)$ /cgi-bin/WebObjects/App.woa/$1upload$2 
 [L,PT,QSA]
 
 I guess those two above translate standard ajax and file upload calls in 
 the same way?
 
 Yes. The upload bit is for the AjaxFlexibleFileUpload IIRC.
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 
 [L,PT,QSA]
 
 and so, these I guess translate calls from errest, direct actions and 
 basic components?
 
 DAs, component actions and the ERXStaticResourceRequestHandler - which you 
 won't need in deployment I think. This was copied from my development 
 apache config.
 
 I can test around with these a bit, but I'm not certain I understand what 
 they are doing --
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 
 The first group (\d*?/?) checks whether there's an instance ID in the URL 
 and appends that as $1. You might not need that. The second group (.*) 
 takes the rest and appends it as $2.
 
 all cool, but you must also have some code in your app to return short 
 urls during deployment?
 
 I used to have a menu item that used deployment urls for things like 
 signup, but used component urls locally during development, but I am 
 guessing with WOnder I might have a different approach there?
 
 Yes, you can set 
 er.extensions.ERXApplication.replaceApplicationPath.pattern and 
 er.extensions.ERXApplication.replaceApplicationPath.replace in your 
 properties and use 
 
  public String _rewriteURL(String url) {
  url = super._rewriteURL(url);
 ...
  return url;
  }
 
 in your ERXApplication subclass if you need more special things.
 
 Fabian
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/george%40boxofficetickets.com
 
 This email sent to geo...@boxofficetickets.com
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:

Re: apache RewriteEngine

2012-01-29 Thread George Domurot
Correct.  And, if you use your default action as your entrance, then this will 
provide a nice URL starting point:

http://domain/myapp

-G


On Jan 29, 2012, at 4:21 PM, Jesse Tayler wrote:

 ah, let me see if I follow
 
 when I use a rule like
 
RewriteRule ^/myapp(.*)$ /apps/WebObjects/MyApp.woa$1 [PT,L]
 
 a url with my myapp in it, would expand and all I'd need is the /wa/entrance 
 or something like so?
 
   http://my.domain/myapp/wa/entrance
 
 am I following there?
 
 
 
 On Jan 29, 2012, at 6:39 PM, George Domurot wrote:
 
 It looks like these options may be over complicating things.  While you can 
 get super fancy with rewrites, I've found it's easiest to use Wonder's 
 built-in support and one singe rule to get deployed.  If you need additional 
 rules, you can stack them in above this one, otherwise this configuration 
 should take care of you:
 
 1) in your Resources/Properties file add (to get Wonder to rewrite during 
 deployment):
 
 # Apache Deployment Rewrite
 er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa
 er.extensions.ERXApplication.replaceApplicationPath.replace=/myapp
 
 
 2) In your VirtualHost config, include (for Apache to reverse Wonder's 
 rewrite from above):
 
   IfModule mod_rewrite.c
   RewriteEngine On
  RewriteRule ^/myapp(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
   /IfModule
 
 -G
 
 On Jan 29, 2012, at 1:36 PM, Jesse Tayler wrote:
 
 
 A quick test, I wrote a rule like yours
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 [L,PT,QSA]
 
 that I'd expect to redirect a URL like this:
 
 http://mydomain.com/wa/entrance
 
 to
 
 http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance
 
 
 aside from using SSL port :443 I don't see much there, I just added a 
 simple virtual host to apache.conf.
 
 I'm either misunderstanding the URL that should trigger this rule, or it's 
 not working in a way I'm unsure how to debug -
 
 thoughts?
 
 
 
 
 On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:
 
 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user 
 profile, or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their 
 hands on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
 # root rewrite
 RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
 RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)upload(.*)$ /cgi-bin/WebObjects/App.woa/$1upload$2 
 [L,PT,QSA]
 
 I guess those two above translate standard ajax and file upload calls in 
 the same way?
 
 Yes. The upload bit is for the AjaxFlexibleFileUpload IIRC.
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 
 [L,PT,QSA]
 
 and so, these I guess translate calls from errest, direct actions and 
 basic components?
 
 DAs, component actions and the ERXStaticResourceRequestHandler - which you 
 won't need in deployment I think. This was copied from my development 
 apache config.
 
 I can test around with these a bit, but I'm not certain I understand what 
 they are doing --
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 
 The first group (\d*?/?) checks whether there's an instance ID in the 
 URL and appends that as $1. You might not need that. The second group 
 (.*) takes the rest and appends it as $2.
 
 all cool, but you must also have some code in your app to return short 
 urls during deployment?
 
 I used to have a menu item that used deployment urls for things like 
 signup, but used component urls locally during development, but I am 
 guessing with WOnder I might have a different approach there?
 
 Yes, you can set 
 er.extensions.ERXApplication.replaceApplicationPath.pattern and 
 er.extensions.ERXApplication.replaceApplicationPath.replace in your 
 properties and use 
 
 public String _rewriteURL(String url) {
 url = super._rewriteURL(url);
...
 return url;
 }
 
 in your ERXApplication subclass if you need more special things.
 
 Fabian
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/george%40boxofficetickets.com
 
 This email sent to geo...@boxofficetickets.com
 
 


 

Re: apache RewriteEngine

2012-01-29 Thread Jesse Tayler

nice!

but I must be having apache voodoo

links with

/apps/WebObjects/WOMan.woa/wa/signup

pass through

IfModule mod_rewrite.c
RewriteEngine On
RewriteRule ^/woman(.*)$ /apps/WebObjects/WOMan.woa$1 [PT,L]
   /IfModule

and resolve to

https://ec.planaby.com/woman/wa/signup

but apache reports 404, not found

I get the usual response from apachectl

 sudo apachectl graceful
[Sun Jan 29 19:55:21 2012] [warn] module WebObjects_module is already loaded, 
skipping

what did I miss here?




On Jan 29, 2012, at 7:31 PM, George Domurot wrote:

 Correct.  And, if you use your default action as your entrance, then this 
 will provide a nice URL starting point:
 
 http://domain/myapp
 
 -G
 
 
 On Jan 29, 2012, at 4:21 PM, Jesse Tayler wrote:
 
 ah, let me see if I follow
 
 when I use a rule like
 
   RewriteRule ^/myapp(.*)$ /apps/WebObjects/MyApp.woa$1 [PT,L]
 
 a url with my myapp in it, would expand and all I'd need is the /wa/entrance 
 or something like so?
 
  http://my.domain/myapp/wa/entrance
 
 am I following there?
 
 
 
 On Jan 29, 2012, at 6:39 PM, George Domurot wrote:
 
 It looks like these options may be over complicating things.  While you can 
 get super fancy with rewrites, I've found it's easiest to use Wonder's 
 built-in support and one singe rule to get deployed.  If you need 
 additional rules, you can stack them in above this one, otherwise this 
 configuration should take care of you:
 
 1) in your Resources/Properties file add (to get Wonder to rewrite during 
 deployment):
 
 # Apache Deployment Rewrite
 er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa
 er.extensions.ERXApplication.replaceApplicationPath.replace=/myapp
 
 
 2) In your VirtualHost config, include (for Apache to reverse Wonder's 
 rewrite from above):
 
  IfModule mod_rewrite.c
  RewriteEngine On
 RewriteRule ^/myapp(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
  /IfModule
 
 -G
 
 On Jan 29, 2012, at 1:36 PM, Jesse Tayler wrote:
 
 
 A quick test, I wrote a rule like yours
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 
 [L,PT,QSA]
 
 that I'd expect to redirect a URL like this:
 
 http://mydomain.com/wa/entrance
 
 to
 
 http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance
 
 
 aside from using SSL port :443 I don't see much there, I just added a 
 simple virtual host to apache.conf.
 
 I'm either misunderstanding the URL that should trigger this rule, or it's 
 not working in a way I'm unsure how to debug -
 
 thoughts?
 
 
 
 
 On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:
 
 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user 
 profile, or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their 
 hands on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
 # root rewrite
 RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
 RewriteRule ^/(\d*?/?)ajax/(.*)$ /cgi-bin/WebObjects/App.woa/$1ajax/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)upload(.*)$ 
 /cgi-bin/WebObjects/App.woa/$1upload$2 [L,PT,QSA]
 
 I guess those two above translate standard ajax and file upload calls in 
 the same way?
 
 Yes. The upload bit is for the AjaxFlexibleFileUpload IIRC.
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wo/(.*)$ /cgi-bin/WebObjects/App.woa/$1wo/$2 
 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)wr(.*)$ /cgi-bin/WebObjects/App.woa/$1wr$2 
 [L,PT,QSA]
 
 and so, these I guess translate calls from errest, direct actions and 
 basic components?
 
 DAs, component actions and the ERXStaticResourceRequestHandler - which 
 you won't need in deployment I think. This was copied from my development 
 apache config.
 
 I can test around with these a bit, but I'm not certain I understand 
 what they are doing --
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /cgi-bin/WebObjects/App.woa/$1wa/$2 
 [L,PT,QSA]
 
 The first group (\d*?/?) checks whether there's an instance ID in the 
 URL and appends that as $1. You might not need that. The second group 
 (.*) takes the rest and appends it as $2.
 
 all cool, but you must also have some code in your app to return short 
 urls during deployment?
 
 I used to have a menu item that used deployment urls for things like 
 signup, but used component urls locally during development, but I am 
 guessing with WOnder I might have a different approach there?
 
 Yes, you can set 
 er.extensions.ERXApplication.replaceApplicationPath.pattern and 
 er.extensions.ERXApplication.replaceApplicationPath.replace in your 

Re: apache RewriteEngine

2012-01-29 Thread Jesse Tayler

I noted that the WebObjects_module was indeed loading AFTER and indeed, there 
are duplicate entries somewhere

so, in my httpd.conf, I've simply moved the loading of mod_WebObjects.so to 
BEFORE mod_rewrite.so

however, I guess I still have a reference that you suggest I delete since I get 
the duplicate error?

I'm not sure where these other conf files are at -- /etc/httpd/conf editing the 
httpd.conf where I've just put my single domain there at the bottom of the file 
and I've edited these Load statements from standard stuff I find above 
including the mod_WebObjects.so apparently loading twice, and after the 
mod_rewrite

Am I on track here?

thanks


On Jan 29, 2012, at 8:59 PM, Pascal Robert wrote:

 
 Le 2012-01-29 à 20:34, Jesse Tayler a écrit :
 
 
 nice!
 
 but I must be having apache voodoo
 
 links with
 
 /apps/WebObjects/WOMan.woa/wa/signup
 
 pass through
 
   IfModule mod_rewrite.c
   RewriteEngine On
   RewriteRule ^/woman(.*)$ /apps/WebObjects/WOMan.woa$1 [PT,L]
  /IfModule
 
 Does mod_WebObjects is loaded before mod_rewrite? If not, the rule won't 
 work. For example, it should be in an order like this:
 
 LoadModule WebObjects_module  /usr/lib64/httpd/modules/mod_WebObjects.so
 LoadModule rewrite_module modules/mod_rewrite.so
 
 and resolve to
 
 https://ec.planaby.com/woman/wa/signup
 
 but apache reports 404, not found
 
 I get the usual response from apachectl
 
 sudo apachectl graceful
 [Sun Jan 29 19:55:21 2012] [warn] module WebObjects_module is already 
 loaded, skipping
 
 That means you have the module twice in Apache config. Probably you have it 
 in httpd.conf, and the other in the config file (webobjects.conf or 
 apache.conf) that comes with WO. Disable it in the later (add a # on the 
 LoadModule line).
 
 what did I miss here?
 
 
 
 
 On Jan 29, 2012, at 7:31 PM, George Domurot wrote:
 
 Correct.  And, if you use your default action as your entrance, then this 
 will provide a nice URL starting point:
 
 http://domain/myapp
 
 -G
 
 
 On Jan 29, 2012, at 4:21 PM, Jesse Tayler wrote:
 
 ah, let me see if I follow
 
 when I use a rule like
 
 RewriteRule ^/myapp(.*)$ /apps/WebObjects/MyApp.woa$1 [PT,L]
 
 a url with my myapp in it, would expand and all I'd need is the 
 /wa/entrance or something like so?
 
http://my.domain/myapp/wa/entrance
 
 am I following there?
 
 
 
 On Jan 29, 2012, at 6:39 PM, George Domurot wrote:
 
 It looks like these options may be over complicating things.  While you 
 can get super fancy with rewrites, I've found it's easiest to use 
 Wonder's built-in support and one singe rule to get deployed.  If you 
 need additional rules, you can stack them in above this one, otherwise 
 this configuration should take care of you:
 
 1) in your Resources/Properties file add (to get Wonder to rewrite during 
 deployment):
 
 # Apache Deployment Rewrite
 er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa
 er.extensions.ERXApplication.replaceApplicationPath.replace=/myapp
 
 
 2) In your VirtualHost config, include (for Apache to reverse Wonder's 
 rewrite from above):
 
IfModule mod_rewrite.c
RewriteEngine On
   RewriteRule ^/myapp(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
/IfModule
 
 -G
 
 On Jan 29, 2012, at 1:36 PM, Jesse Tayler wrote:
 
 
 A quick test, I wrote a rule like yours
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 
 [L,PT,QSA]
 
 that I'd expect to redirect a URL like this:
 
 http://mydomain.com/wa/entrance
 
 to
 
 http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance
 
 
 aside from using SSL port :443 I don't see much there, I just added a 
 simple virtual host to apache.conf.
 
 I'm either misunderstanding the URL that should trigger this rule, or 
 it's not working in a way I'm unsure how to debug -
 
 thoughts?
 
 
 
 
 On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:
 
 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user 
 profile, or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their 
 hands on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
 # root rewrite
 RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
 RewriteRule ^/(\d*?/?)ajax/(.*)$ 
 /cgi-bin/WebObjects/App.woa/$1ajax/$2 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)upload(.*)$ 
 /cgi-bin/WebObjects/App.woa/$1upload$2 [L,PT,QSA]
 
 I guess those two above translate standard ajax and file upload calls 
 in the same way?
 
 Yes. The upload bit is for the AjaxFlexibleFileUpload IIRC.
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ 

Re: apache RewriteEngine

2012-01-29 Thread Paul D Yu
Jesse

I'd suggest you just pay Pascal to set this up for you.

Sent from my iPad

On Jan 29, 2012, at 9:20 PM, Jesse Tayler jtay...@oeinc.com wrote:

 
 I noted that the WebObjects_module was indeed loading AFTER and indeed, there 
 are duplicate entries somewhere
 
 so, in my httpd.conf, I've simply moved the loading of mod_WebObjects.so to 
 BEFORE mod_rewrite.so
 
 however, I guess I still have a reference that you suggest I delete since I 
 get the duplicate error?
 
 I'm not sure where these other conf files are at -- /etc/httpd/conf editing 
 the httpd.conf where I've just put my single domain there at the bottom of 
 the file and I've edited these Load statements from standard stuff I find 
 above including the mod_WebObjects.so apparently loading twice, and after the 
 mod_rewrite
 
 Am I on track here?
 
 thanks
 
 
 On Jan 29, 2012, at 8:59 PM, Pascal Robert wrote:
 
 
 Le 2012-01-29 à 20:34, Jesse Tayler a écrit :
 
 
 nice!
 
 but I must be having apache voodoo
 
 links with
 
 /apps/WebObjects/WOMan.woa/wa/signup
 
 pass through
 
  IfModule mod_rewrite.c
  RewriteEngine On
  RewriteRule ^/woman(.*)$ /apps/WebObjects/WOMan.woa$1 [PT,L]
 /IfModule
 
 Does mod_WebObjects is loaded before mod_rewrite? If not, the rule won't 
 work. For example, it should be in an order like this:
 
 LoadModule WebObjects_module  /usr/lib64/httpd/modules/mod_WebObjects.so
 LoadModule rewrite_module modules/mod_rewrite.so
 
 and resolve to
 
 https://ec.planaby.com/woman/wa/signup
 
 but apache reports 404, not found
 
 I get the usual response from apachectl
 
 sudo apachectl graceful
 [Sun Jan 29 19:55:21 2012] [warn] module WebObjects_module is already 
 loaded, skipping
 
 That means you have the module twice in Apache config. Probably you have it 
 in httpd.conf, and the other in the config file (webobjects.conf or 
 apache.conf) that comes with WO. Disable it in the later (add a # on the 
 LoadModule line).
 
 what did I miss here?
 
 
 
 
 On Jan 29, 2012, at 7:31 PM, George Domurot wrote:
 
 Correct.  And, if you use your default action as your entrance, then this 
 will provide a nice URL starting point:
 
 http://domain/myapp
 
 -G
 
 
 On Jan 29, 2012, at 4:21 PM, Jesse Tayler wrote:
 
 ah, let me see if I follow
 
 when I use a rule like
 
RewriteRule ^/myapp(.*)$ /apps/WebObjects/MyApp.woa$1 [PT,L]
 
 a url with my myapp in it, would expand and all I'd need is the 
 /wa/entrance or something like so?
 
http://my.domain/myapp/wa/entrance
 
 am I following there?
 
 
 
 On Jan 29, 2012, at 6:39 PM, George Domurot wrote:
 
 It looks like these options may be over complicating things.  While you 
 can get super fancy with rewrites, I've found it's easiest to use 
 Wonder's built-in support and one singe rule to get deployed.  If you 
 need additional rules, you can stack them in above this one, otherwise 
 this configuration should take care of you:
 
 1) in your Resources/Properties file add (to get Wonder to rewrite 
 during deployment):
 
 # Apache Deployment Rewrite
 er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa
 er.extensions.ERXApplication.replaceApplicationPath.replace=/myapp
 
 
 2) In your VirtualHost config, include (for Apache to reverse Wonder's 
 rewrite from above):
 
   IfModule mod_rewrite.c
   RewriteEngine On
RewriteRule ^/myapp(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
   /IfModule
 
 -G
 
 On Jan 29, 2012, at 1:36 PM, Jesse Tayler wrote:
 
 
 A quick test, I wrote a rule like yours
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 
 [L,PT,QSA]
 
 that I'd expect to redirect a URL like this:
 
 http://mydomain.com/wa/entrance
 
 to
 
 http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance
 
 
 aside from using SSL port :443 I don't see much there, I just added a 
 simple virtual host to apache.conf.
 
 I'm either misunderstanding the URL that should trigger this rule, or 
 it's not working in a way I'm unsure how to debug -
 
 thoughts?
 
 
 
 
 On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:
 
 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user 
 profile, or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their 
 hands on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
 # root rewrite
 RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
 RewriteRule ^/(\d*?/?)ajax/(.*)$ 
 /cgi-bin/WebObjects/App.woa/$1ajax/$2 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)upload(.*)$ 
 /cgi-bin/WebObjects/App.woa/$1upload$2 [L,PT,QSA]
 
 I guess those two above translate 

Re: apache RewriteEngine

2012-01-29 Thread Pascal Robert

Le 2012-01-29 à 21:20, Jesse Tayler a écrit :

 
 I noted that the WebObjects_module was indeed loading AFTER and indeed, there 
 are duplicate entries somewhere
 
 so, in my httpd.conf, I've simply moved the loading of mod_WebObjects.so to 
 BEFORE mod_rewrite.so
 
 however, I guess I still have a reference that you suggest I delete since I 
 get the duplicate error?
 
 I'm not sure where these other conf files are at -- /etc/httpd/conf editing 
 the httpd.conf where I've just put my single domain there at the bottom of 
 the file and I've edited these Load statements from standard stuff I find 
 above including the mod_WebObjects.so apparently loading twice, and after the 
 mod_rewrite

Check in /etc/httpd/conf.d/ if you have a apache.conf or webobjects.conf file 
in there (or do a recursive grep, e.g.: grep -r mod_WebObjects /etc/httpd/) 
to find where the second one is coming.

 Am I on track here?
 
 thanks
 
 
 On Jan 29, 2012, at 8:59 PM, Pascal Robert wrote:
 
 
 Le 2012-01-29 à 20:34, Jesse Tayler a écrit :
 
 
 nice!
 
 but I must be having apache voodoo
 
 links with
 
 /apps/WebObjects/WOMan.woa/wa/signup
 
 pass through
 
  IfModule mod_rewrite.c
  RewriteEngine On
  RewriteRule ^/woman(.*)$ /apps/WebObjects/WOMan.woa$1 [PT,L]
 /IfModule
 
 Does mod_WebObjects is loaded before mod_rewrite? If not, the rule won't 
 work. For example, it should be in an order like this:
 
 LoadModule WebObjects_module  /usr/lib64/httpd/modules/mod_WebObjects.so
 LoadModule rewrite_module modules/mod_rewrite.so
 
 and resolve to
 
 https://ec.planaby.com/woman/wa/signup
 
 but apache reports 404, not found
 
 I get the usual response from apachectl
 
 sudo apachectl graceful
 [Sun Jan 29 19:55:21 2012] [warn] module WebObjects_module is already 
 loaded, skipping
 
 That means you have the module twice in Apache config. Probably you have it 
 in httpd.conf, and the other in the config file (webobjects.conf or 
 apache.conf) that comes with WO. Disable it in the later (add a # on the 
 LoadModule line).
 
 what did I miss here?
 
 
 
 
 On Jan 29, 2012, at 7:31 PM, George Domurot wrote:
 
 Correct.  And, if you use your default action as your entrance, then this 
 will provide a nice URL starting point:
 
 http://domain/myapp
 
 -G
 
 
 On Jan 29, 2012, at 4:21 PM, Jesse Tayler wrote:
 
 ah, let me see if I follow
 
 when I use a rule like
 
RewriteRule ^/myapp(.*)$ /apps/WebObjects/MyApp.woa$1 [PT,L]
 
 a url with my myapp in it, would expand and all I'd need is the 
 /wa/entrance or something like so?
 
   http://my.domain/myapp/wa/entrance
 
 am I following there?
 
 
 
 On Jan 29, 2012, at 6:39 PM, George Domurot wrote:
 
 It looks like these options may be over complicating things.  While you 
 can get super fancy with rewrites, I've found it's easiest to use 
 Wonder's built-in support and one singe rule to get deployed.  If you 
 need additional rules, you can stack them in above this one, otherwise 
 this configuration should take care of you:
 
 1) in your Resources/Properties file add (to get Wonder to rewrite 
 during deployment):
 
 # Apache Deployment Rewrite
 er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa
 er.extensions.ERXApplication.replaceApplicationPath.replace=/myapp
 
 
 2) In your VirtualHost config, include (for Apache to reverse Wonder's 
 rewrite from above):
 
   IfModule mod_rewrite.c
   RewriteEngine On
  RewriteRule ^/myapp(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
   /IfModule
 
 -G
 
 On Jan 29, 2012, at 1:36 PM, Jesse Tayler wrote:
 
 
 A quick test, I wrote a rule like yours
 
 RewriteRule ^/(\d*?/?)wa/(.*)$ /apps/WebObjects/WOMan.woa/$1wa/$2 
 [L,PT,QSA]
 
 that I'd expect to redirect a URL like this:
 
 http://mydomain.com/wa/entrance
 
 to
 
 http://mydomain.com/apps/WebObjects/WOMan.woa/wa/entrance
 
 
 aside from using SSL port :443 I don't see much there, I just added a 
 simple virtual host to apache.conf.
 
 I'm either misunderstanding the URL that should trigger this rule, or 
 it's not working in a way I'm unsure how to debug -
 
 thoughts?
 
 
 
 
 On Jan 29, 2012, at 2:35 PM, Fabian Peters wrote:
 
 
 Am 29.01.2012 um 19:44 schrieb Jesse Tayler:
 
 
 oh thanks fabian! 
 
 maybe just what I was looking for -- 
 
 the site is like twitter, so there's standard urls to reach a user 
 profile, or a post and those urls should be short, of course.
 
 They work for me, but I'm by no means a rewrite expert...
 
 rewrite expert? ick! who would want to be that!! 
 
 I mean, the syntax looks like someone was drunk while slapping their 
 hands on the keypad...
 
 On Jan 29, 2012, at 1:10 PM, Fabian Peters wrote:
 
 # root rewrite
 RewriteRule ^/$ /cgi-bin/WebObjects/App.woa [L,PT]
 
 
 ah, so this basically translates anything into a full woa I guess?
 
 Yes
 
 RewriteRule ^/(\d*?/?)ajax/(.*)$ 
 /cgi-bin/WebObjects/App.woa/$1ajax/$2 [L,PT,QSA]
 RewriteRule ^/(\d*?/?)upload(.*)$ 

Re: apache RewriteEngine

2012-01-29 Thread Jesse Tayler

On Jan 29, 2012, at 9:28 PM, Paul D Yu wrote:

 I'd suggest you just pay Pascal to set this up for you.


PFFT! gladly!

Or I'll just pay someone to come over and club me.

I notice my WOnder app is now actually generating the URLs just as I'd expect 
-- cool, apache reports 404 still- suck.

I've been up too long, so maybe I'm tired, things look mostly as I recall from 
other installations over the years...

I note that I have a few rules ahead of my virtual host

I don't see anything that should cause these rules not to fire, here's the end 
of the httpd.conf  with my lonely doaine there at the end.



Alias /WebObjects /opt/WOWebServerResources/WebObjects

Directory /opt/WOWebServerResources/WebObjects
  AllowOverride All
  Order allow,deny
  Allow from all
/Directory

LocationMatch /apps/WebObjects/.*
Order allow,deny
Allow from all
/LocationMatch


VirtualHost mydomain.com:443
DocumentRoot /var/www/html/mydomain
ServerName mydomain.com
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/mydomain.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/mydomain.pem
SSLCertificateChainFile /etc/httpd/conf/gd_intermediate.crt

IfModule mod_rewrite.c
RewriteEngine On
RewriteRule ^/woman(.*)$ /apps/WebObjects/WOMan.woa$1 [PT,L]
   /IfModule
/VirtualHost

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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread Pascal Robert

Le 2012-01-29 à 21:56, Jesse Tayler a écrit :

 
 On Jan 29, 2012, at 9:28 PM, Paul D Yu wrote:
 
 I'd suggest you just pay Pascal to set this up for you.
 
 
 PFFT! gladly!
 
 Or I'll just pay someone to come over and club me.
 
 I notice my WOnder app is now actually generating the URLs just as I'd expect 
 -- cool, apache reports 404 still- suck.
 
 I've been up too long, so maybe I'm tired, things look mostly as I recall 
 from other installations over the years...
 
 I note that I have a few rules ahead of my virtual host
 
 I don't see anything that should cause these rules not to fire, here's the 
 end of the httpd.conf  with my lonely doaine there at the end.

Any errors in the logs? And you can enable mod_rewrite logging with:

RewriteLog /var/log/httpd/rewrite.log
RewriteLogLevel 3

 
 
 Alias /WebObjects /opt/WOWebServerResources/WebObjects
 
 Directory /opt/WOWebServerResources/WebObjects
   AllowOverride All
   Order allow,deny
   Allow from all
 /Directory
 
 LocationMatch /apps/WebObjects/.*
 Order allow,deny
 Allow from all
 /LocationMatch
 
 
 VirtualHost mydomain.com:443
 DocumentRoot /var/www/html/mydomain
 ServerName mydomain.com
 SSLEngine on
 SSLCertificateFile /etc/httpd/conf/ssl.crt/mydomain.com.crt
 SSLCertificateKeyFile /etc/httpd/conf/ssl.key/mydomain.pem
 SSLCertificateChainFile /etc/httpd/conf/gd_intermediate.crt
 
   IfModule mod_rewrite.c
   RewriteEngine On
   RewriteRule ^/woman(.*)$ /apps/WebObjects/WOMan.woa$1 [PT,L]
/IfModule
 /VirtualHost
 


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

This email sent to arch...@mail-archive.com

Re: apache RewriteEngine

2012-01-29 Thread Jesse Tayler

On Jan 29, 2012, at 10:22 PM, Pascal Robert wrote:

 Any errors in the logs? And you can enable mod_rewrite logging with:
 
 RewriteLog /var/log/httpd/rewrite.log
 RewriteLogLevel 3

none, even after apache created the empty logfile when I turned the rule on.

suggests the modrewrite isn't working afterall?


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

This email sent to arch...@mail-archive.com


Re: apache RewriteEngine

2012-01-29 Thread Pascal Robert

Le 2012-01-29 à 22:31, Jesse Tayler a écrit :

 
 On Jan 29, 2012, at 10:22 PM, Pascal Robert wrote:
 
 Any errors in the logs? And you can enable mod_rewrite logging with:
 
 RewriteLog /var/log/httpd/rewrite.log
 RewriteLogLevel 3
 
 none, even after apache created the empty logfile when I turned the rule on.
 
 suggests the modrewrite isn't working afterall?

Looks like it. Try it on static files to see if it works. You can also check if 
rewrite_module is in the output of /usr/sbin/httpd -M
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com