Mobile Device site rewrite rule

2011-07-07 Thread Kieran Kelleher
Does anyone have a comprehensive set of RewriteCond statements that I can 
copy/paste for a mobile site rewrite rule? 
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Mobile Device site rewrite rule

2011-07-07 Thread Pascal Robert

Le 2011-07-07 à 14:53, Kieran Kelleher a écrit :

 Does anyone have a comprehensive set of RewriteCond statements that I can 
 copy/paste for a mobile site rewrite rule? 

I guess the mobile site is using REST or DirectActions? If so, look at my 
ERRest slides (the Friday talk) for an example, in the Versionning section. You 
just need to change /ra to /wa if you are using DAs. 
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Mobile Device site rewrite rule

2011-07-07 Thread Kieran Kelleher
Pascal,

I am talking about layout/styling!

Background: I have a crappy desktop table-based static layout done by a 
designer using some Adobe auto-generated output from a few weeks ago. I added 
my jQuery logic and WO direct actions to that for the few small bits of 
dynamic logic needed by the customer.

Today, I was asked for a mobile version of this one-page site (it is a landing 
page from a mass snail-mail campaign) and since the original version is 
impossible to just style as mobile with CSS due to its awful non-semantic 
layout, and since it is too late to find a web designer who can redo the entire 
thing, I am creating a very simple semantic layout for mobile. So, I am just 
going to use apache rewrite rule on the user agent to rewrite mobile device 
requests to a different URL containing the mobile site.

What I am looking for is the huge list of mobile user agents as might be used 
in this example:

http://stackoverflow.com/questions/1005153/auto-detect-mobile-browser-via-user-agent

Either way, my objective is simple:
Deliver mobile site home page to mobile (or small-screen devices) and regular 
home page to the rest. And I need to do this using either apache and/or 
javascript - no java or WebObjects is involved in rendering this site home page.


On Jul 7, 2011, at 2:59 PM, Pascal Robert wrote:

 
 Le 2011-07-07 à 14:53, Kieran Kelleher a écrit :
 
 Does anyone have a comprehensive set of RewriteCond statements that I can 
 copy/paste for a mobile site rewrite rule? 
 
 I guess the mobile site is using REST or DirectActions? If so, look at my 
 ERRest slides (the Friday talk) for an example, in the Versionning section. 
 You just need to change /ra to /wa if you are using DAs.

 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Mobile Device site rewrite rule

2011-07-07 Thread David Holt
You might find this helpful:

http://html5boilerplate.com/mobile/


On 2011-07-07, at 12:24 PM, Kieran Kelleher wrote:

 Pascal,
 
 I am talking about layout/styling!
 
 Background: I have a crappy desktop table-based static layout done by a 
 designer using some Adobe auto-generated output from a few weeks ago. I 
 added my jQuery logic and WO direct actions to that for the few small bits of 
 dynamic logic needed by the customer.
 
 Today, I was asked for a mobile version of this one-page site (it is a 
 landing page from a mass snail-mail campaign) and since the original version 
 is impossible to just style as mobile with CSS due to its awful non-semantic 
 layout, and since it is too late to find a web designer who can redo the 
 entire thing, I am creating a very simple semantic layout for mobile. So, I 
 am just going to use apache rewrite rule on the user agent to rewrite mobile 
 device requests to a different URL containing the mobile site.
 
 What I am looking for is the huge list of mobile user agents as might be used 
 in this example:
 
 http://stackoverflow.com/questions/1005153/auto-detect-mobile-browser-via-user-agent
 
 Either way, my objective is simple:
 Deliver mobile site home page to mobile (or small-screen devices) and regular 
 home page to the rest. And I need to do this using either apache and/or 
 javascript - no java or WebObjects is involved in rendering this site home 
 page.
 
 
 On Jul 7, 2011, at 2:59 PM, Pascal Robert wrote:
 
 
 Le 2011-07-07 à 14:53, Kieran Kelleher a écrit :
 
 Does anyone have a comprehensive set of RewriteCond statements that I can 
 copy/paste for a mobile site rewrite rule? 
 
 I guess the mobile site is using REST or DirectActions? If so, look at my 
 ERRest slides (the Friday talk) for an example, in the Versionning section. 
 You just need to change /ra to /wa if you are using DAs.
 
 ___
 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:
 http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
 
 This email sent to programming...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2010-11-03 Thread Dev WO
Hello Jeff,

On your server you may have virtual host setup, so the rewrite rule has to be 
put inside the virtual host configuration /etc/apache2/sites/ for each site 
that need it.

Xavier



 Did this on my dev machine and it worked great, but on my leopard server 
 deployment machine I added the same entry in /etc/apache2/httpd.conf and no 
 dice.  The shorter URL's are being output from my app using the Wonder 
 er.extensions.ERXApplication.replaceApplicationPath properties, but I get the 
 requested URL not found error when I click on one of them.  Nothing in the 
 rewrite.log file.  Is there some other property to set in httpd.conf or 
 elsewhere?
 
 Thanks,
 Jeff
 
 
 On Apr 16, 2009, at 9:50 AM, Kieran Kelleher wrote:
 
 Finally! Searching the apache docs more, I found another option PT, the 
 passthrough option, that specifically refers to this being needed for 
 mod_alias or using mod_rewrite with any other modules that do 
 URI-to-filename mapping or translation.
 
 The final working rewrite rule is:
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /var/log/apache2/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1 [PT]
 /IfModule
 
 Thanks for the mind-prodding guys.
 
 Now it is working in apache2 on my dev machine. Hopefully apache 1.3 will be 
 similar configuration when I deploy this feature in a few days.
 
 Regards, Kieran
 
 On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:
 
 I added an [R] option on the end of the rule to force an external redirect 
 and it works, albeit the URL in the browser address bar becomes the ugly 
 one. So, at least this is returning the page ... not let's see if I can 
 make it do without an external redirect so that the short URL stays in the 
 browser address bar  (since the marketing design spec wants the short 
 URL)
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /tmp/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1 [R]
 /IfModule
 
 
 On Apr 16, 2009, at 10:17 AM, Kieran Kelleher wrote:
 
 I am using WO 5.3 on leopard with apache 2.2.9. The wo module is coming 
 before rewrite module in httpd.conf:
 LoadModule WebObjects_module 
 /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
 LoadModule rewrite_module libexec/apache2/mod_rewrite.so
 
 Further investigation shows that each time I try to access the short URL, 
 I see the following error in the apache error_log:
 [Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not exist: 
 /Library/WebServer/Documents/cgi-bin
 
 So just maybe the rewrite rule is working but the result may be 
 conflicting with mod_alias which has a scriptalias entry for the wo 
 cgi-bin???
 
 Does that ring any bells with anyone?
 
 Kieran
 
 
 
 On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:
 
 if you're rewriting to wo instances, you need to make sure the ordering 
 of your modules is right, too ... in 5.3 (i don't know about 5.4), the 
 order of the modules was wrong -- you have to make mod_webobjects come 
 before mod_rewrite (iirc).
 
 ms
 
 On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:
 
 Hello list,
 
 Well when Brian Moore said mod_rewrite was voodoo 
 (http://httpd.apache.org/docs/2.2/rewrite/), I was skeptical, but now I 
 believe him! I need some help for what I think should be a pretty simple 
 rewrite rule. I am currently trying to get this to work initially on my 
 development machine, and I keep getting a 404 Not Found message from 
 apache (version 2.2.9).
 
 The rule is supposed to take convert URLs like this :
 http://localhost/purl/KieranKelleher
 
 and rewrite them like this (on my dev machine):
 http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher
 
 I have added this to the end of my /etc/apache2/httpd.conf just before 
 the last 2 includes at the end of the file (other/*.conf and WO 
 apache.conf)
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /tmp/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1
 /IfModule
 
 I can confirm that when I restarted apache it creates the 
 /tmp/rewrite.log if it does not exist, however nothing gets written 
 there.
 
 I have studied the docs, the wiki docs and many examples. This looks 
 like it should work, but I cannot for the life of me figure out why it 
 does not work :-(
 
 Any clues or hints would be appreciated.
 
 Thanks, Kieran
 ___
 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:
 http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
 
 This email sent to msch...@mdimension.com

Re: [OT] Apache rewrite rule

2010-11-03 Thread Jeff Schmitz
Thanks!
   That was it.  had to add it to the _any_80_.conf file in 
/etc/apache2/sites/  Man, I read a lot of stuff in a lot of places on 
mod_rewrite, and nothing mentioned the config files in the sites dir, so I 
added a bit to the wiki at:

http://wiki.objectstyle.org/confluence/display/WO/Deployment-Apache

Hope it's not too simplistic, but something like that would have saved me some 
time and angst.

Jeff




On Nov 3, 2010, at 11:29 AM, Dev WO wrote:

 Hello Jeff,
 
 On your server you may have virtual host setup, so the rewrite rule has to be 
 put inside the virtual host configuration /etc/apache2/sites/ for each site 
 that need it.
 
 Xavier
 
 
 
 Did this on my dev machine and it worked great, but on my leopard server 
 deployment machine I added the same entry in /etc/apache2/httpd.conf and no 
 dice.  The shorter URL's are being output from my app using the Wonder 
 er.extensions.ERXApplication.replaceApplicationPath properties, but I get 
 the requested URL not found error when I click on one of them.  Nothing in 
 the rewrite.log file.  Is there some other property to set in httpd.conf or 
 elsewhere?
 
 Thanks,
 Jeff
 
 
 On Apr 16, 2009, at 9:50 AM, Kieran Kelleher wrote:
 
 Finally! Searching the apache docs more, I found another option PT, the 
 passthrough option, that specifically refers to this being needed for 
 mod_alias or using mod_rewrite with any other modules that do 
 URI-to-filename mapping or translation.
 
 The final working rewrite rule is:
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /var/log/apache2/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1 [PT]
 /IfModule
 
 Thanks for the mind-prodding guys.
 
 Now it is working in apache2 on my dev machine. Hopefully apache 1.3 will 
 be similar configuration when I deploy this feature in a few days.
 
 Regards, Kieran
 
 On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:
 
 I added an [R] option on the end of the rule to force an external redirect 
 and it works, albeit the URL in the browser address bar becomes the ugly 
 one. So, at least this is returning the page ... not let's see if I can 
 make it do without an external redirect so that the short URL stays in the 
 browser address bar  (since the marketing design spec wants the short 
 URL)
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /tmp/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1 [R]
 /IfModule
 
 
 On Apr 16, 2009, at 10:17 AM, Kieran Kelleher wrote:
 
 I am using WO 5.3 on leopard with apache 2.2.9. The wo module is coming 
 before rewrite module in httpd.conf:
 LoadModule WebObjects_module 
 /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
 LoadModule rewrite_module libexec/apache2/mod_rewrite.so
 
 Further investigation shows that each time I try to access the short URL, 
 I see the following error in the apache error_log:
 [Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not exist: 
 /Library/WebServer/Documents/cgi-bin
 
 So just maybe the rewrite rule is working but the result may be 
 conflicting with mod_alias which has a scriptalias entry for the wo 
 cgi-bin???
 
 Does that ring any bells with anyone?
 
 Kieran
 
 
 
 On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:
 
 if you're rewriting to wo instances, you need to make sure the ordering 
 of your modules is right, too ... in 5.3 (i don't know about 5.4), the 
 order of the modules was wrong -- you have to make mod_webobjects come 
 before mod_rewrite (iirc).
 
 ms
 
 On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:
 
 Hello list,
 
 Well when Brian Moore said mod_rewrite was voodoo 
 (http://httpd.apache.org/docs/2.2/rewrite/), I was skeptical, but now I 
 believe him! I need some help for what I think should be a pretty 
 simple rewrite rule. I am currently trying to get this to work 
 initially on my development machine, and I keep getting a 404 Not 
 Found message from apache (version 2.2.9).
 
 The rule is supposed to take convert URLs like this :
 http://localhost/purl/KieranKelleher
 
 and rewrite them like this (on my dev machine):
 http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher
 
 I have added this to the end of my /etc/apache2/httpd.conf just before 
 the last 2 includes at the end of the file (other/*.conf and WO 
 apache.conf)
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /tmp/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1
 /IfModule
 
 I can confirm that when I restarted apache it creates the 
 /tmp/rewrite.log if it does not exist, however nothing gets written 
 there.
 
 I have studied the docs, the wiki docs and many examples. This looks 
 like it should work, but I cannot for the life of me

Re: [OT] Apache rewrite rule

2010-11-02 Thread Jeff Schmitz
Did this on my dev machine and it worked great, but on my leopard server 
deployment machine I added the same entry in /etc/apache2/httpd.conf and no 
dice.  The shorter URL's are being output from my app using the Wonder 
er.extensions.ERXApplication.replaceApplicationPath properties, but I get the 
requested URL not found error when I click on one of them.  Nothing in the 
rewrite.log file.  Is there some other property to set in httpd.conf or 
elsewhere?

Thanks,
Jeff


On Apr 16, 2009, at 9:50 AM, Kieran Kelleher wrote:

 Finally! Searching the apache docs more, I found another option PT, the 
 passthrough option, that specifically refers to this being needed for 
 mod_alias or using mod_rewrite with any other modules that do URI-to-filename 
 mapping or translation.
 
 The final working rewrite rule is:
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /var/log/apache2/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1 [PT]
 /IfModule
 
 Thanks for the mind-prodding guys.
 
 Now it is working in apache2 on my dev machine. Hopefully apache 1.3 will be 
 similar configuration when I deploy this feature in a few days.
 
 Regards, Kieran
 
 On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:
 
 I added an [R] option on the end of the rule to force an external redirect 
 and it works, albeit the URL in the browser address bar becomes the ugly 
 one. So, at least this is returning the page ... not let's see if I can make 
 it do without an external redirect so that the short URL stays in the 
 browser address bar  (since the marketing design spec wants the short 
 URL)
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /tmp/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1 [R]
 /IfModule
 
 
 On Apr 16, 2009, at 10:17 AM, Kieran Kelleher wrote:
 
 I am using WO 5.3 on leopard with apache 2.2.9. The wo module is coming 
 before rewrite module in httpd.conf:
 LoadModule WebObjects_module 
 /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
 LoadModule rewrite_module libexec/apache2/mod_rewrite.so
 
 Further investigation shows that each time I try to access the short URL, I 
 see the following error in the apache error_log:
 [Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not exist: 
 /Library/WebServer/Documents/cgi-bin
 
 So just maybe the rewrite rule is working but the result may be conflicting 
 with mod_alias which has a scriptalias entry for the wo cgi-bin???
 
 Does that ring any bells with anyone?
 
 Kieran
 
 
 
 On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:
 
 if you're rewriting to wo instances, you need to make sure the ordering of 
 your modules is right, too ... in 5.3 (i don't know about 5.4), the order 
 of the modules was wrong -- you have to make mod_webobjects come before 
 mod_rewrite (iirc).
 
 ms
 
 On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:
 
 Hello list,
 
 Well when Brian Moore said mod_rewrite was voodoo 
 (http://httpd.apache.org/docs/2.2/rewrite/), I was skeptical, but now I 
 believe him! I need some help for what I think should be a pretty simple 
 rewrite rule. I am currently trying to get this to work initially on my 
 development machine, and I keep getting a 404 Not Found message from 
 apache (version 2.2.9).
 
 The rule is supposed to take convert URLs like this :
 http://localhost/purl/KieranKelleher
 
 and rewrite them like this (on my dev machine):
 http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher
 
 I have added this to the end of my /etc/apache2/httpd.conf just before 
 the last 2 includes at the end of the file (other/*.conf and WO 
 apache.conf)
 
 IfModule rewrite_module
 # rewrite logging
 RewriteLog /tmp/rewrite.log
 
 # PURL feature
 RewriteEngine On
 RewriteRule ^/purl/(.*)$ 
 /cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=$1
 /IfModule
 
 I can confirm that when I restarted apache it creates the 
 /tmp/rewrite.log if it does not exist, however nothing gets written there.
 
 I have studied the docs, the wiki docs and many examples. This looks like 
 it should work, but I cannot for the life of me figure out why it does 
 not work :-(
 
 Any clues or hints would be appreciated.
 
 Thanks, Kieran
 ___
 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:
 http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com
 
 This email sent to msch...@mdimension.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:
 http

Re: Rewrite Rule

2009-09-22 Thread Guido Neitzer
So, if you're going through apache and you have the two patterns set  
and not commented, it should rewrite. Make sure there is no space or  
so at the end of the pattern.


Also, make sure you're running with the ERXWOContext54 in your  
classpath if you are using WO 5.4. Set a breakpoint in _rewriteUrl in  
ERXApplication and see whether it gets hit. If not, check whether the  
WOContext class you're using is an ERXWOContext and if you are running  
5.4, this won't work.


Guido

--
http://www.event-s.net

On 21. Sep. 2009, at 22:33 , ute Hoffmann wrote:


Upps, I think so. At which Property do I have to look to know.

I run in deployment and definitley come via apache but I have not  
set anything deliberately.  I'm a new wonder user

so maybe I overlooked something...?

Am 21.09.2009 um 18:17 schrieb Guido Neitzer:


Are you running in WebServer connect mode?

cug

-- http://www.event-s.net

On 20. Sep. 2009, at 02:02 , ute Hoffmann wrote:


Hi,
should this work for applications which have a session as well,
or will it work only for sessionless apps?

* code
* er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi- 
bin/WebObjects/YourApp.woa
* er.extensions.ERXApplication.replaceApplicationPath.replace=/ 
yourapp

* /code
*
* and in Apache 2.2:
* code
* RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1  
[PT,L]

* /code
*
* or Apache 1.3:
* code
* RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [P,L]
* /code

I put it into the properties file of an Application, but nothing  
changed in the way the URL's were displayed.


I use WOHyperlinks which call directActions with parameters and  
have a session.


I have the Application extend a Application class in a framework  
which then in turn extends ERXApplication.
Could that be part of my problem? But the Application starts up  
ok, and the added properties are in the logfile,

so I THINK they should be seen...

Probably this is very basic, sorry.

Thanks for your help.

Regards,

Ute
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/guido.neitzer%40gmail.com

This email sent to guido.neit...@gmail.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Rewrite Rule

2009-09-21 Thread Guido Neitzer

Are you running in WebServer connect mode?

cug

--  
http://www.event-s.net


On 20. Sep. 2009, at 02:02 , ute Hoffmann wrote:


Hi,
should this work for applications which have a session as well,
or will it work only for sessionless apps?

 * code
 * er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi- 
bin/WebObjects/YourApp.woa
 * er.extensions.ERXApplication.replaceApplicationPath.replace=/ 
yourapp

 * /code
 *
 * and in Apache 2.2:
 * code
 * RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [PT,L]
 * /code
 *
 * or Apache 1.3:
 * code
 * RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [P,L]
 * /code

I put it into the properties file of an Application, but nothing  
changed in the way the URL's were displayed.


I use WOHyperlinks which call directActions with parameters and have  
a session.


I have the Application extend a Application class in a framework  
which then in turn extends ERXApplication.
Could that be part of my problem? But the Application starts up ok,  
and the added properties are in the logfile,

so I THINK they should be seen...

Probably this is very basic, sorry.

Thanks for your help.

Regards,

Ute
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/guido.neitzer%40gmail.com

This email sent to guido.neit...@gmail.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: Rewrite Rule

2009-09-21 Thread ute Hoffmann

Upps, I think so. At which Property do I have to look to know.

I run in deployment and definitley come via apache but I have not set  
anything deliberately.  I'm a new wonder user

so maybe I overlooked something...?

Am 21.09.2009 um 18:17 schrieb Guido Neitzer:


Are you running in WebServer connect mode?

cug

-- http://www.event-s.net

On 20. Sep. 2009, at 02:02 , ute Hoffmann wrote:


Hi,
should this work for applications which have a session as well,
or will it work only for sessionless apps?

 * code
 * er.extensions.ERXApplication.replaceApplicationPath.pattern=/ 
cgi-bin/WebObjects/YourApp.woa
 * er.extensions.ERXApplication.replaceApplicationPath.replace=/ 
yourapp

 * /code
 *
 * and in Apache 2.2:
 * code
 * RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1  
[PT,L]

 * /code
 *
 * or Apache 1.3:
 * code
 * RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [P,L]
 * /code

I put it into the properties file of an Application, but nothing  
changed in the way the URL's were displayed.


I use WOHyperlinks which call directActions with parameters and  
have a session.


I have the Application extend a Application class in a framework  
which then in turn extends ERXApplication.
Could that be part of my problem? But the Application starts up  
ok, and the added properties are in the logfile,

so I THINK they should be seen...

Probably this is very basic, sorry.

Thanks for your help.

Regards,

Ute
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/guido.neitzer 
%40gmail.com


This email sent to guido.neit...@gmail.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Rewrite Rule

2009-09-20 Thread ute Hoffmann

Hi,
should this work for applications which have a session as well,
or will it work only for sessionless apps?

 * code
 * er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi- 
bin/WebObjects/YourApp.woa

 * er.extensions.ERXApplication.replaceApplicationPath.replace=/yourapp
 * /code
 *
 * and in Apache 2.2:
 * code
 * RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [PT,L]
 * /code
 *
 * or Apache 1.3:
 * code
 * RewriteRule ^/yourapp(.*)$ /cgi-bin/WebObjects/YourApp.woa$1 [P,L]
 * /code

I put it into the properties file of an Application, but nothing  
changed in the way the URL's were displayed.


I use WOHyperlinks which call directActions with parameters and have  
a session.


I have the Application extend a Application class in a framework  
which then in turn extends ERXApplication.
Could that be part of my problem? But the Application starts up ok,  
and the added properties are in the logfile,

so I THINK they should be seen...

Probably this is very basic, sorry.

Thanks for your help.

Regards,

Ute ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

[OT] Apache rewrite rule

2009-04-16 Thread Kieran Kelleher

Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http://httpd.apache.org/docs/2.2/rewrite/ 
), I was skeptical, but now I believe him! I need some help for what I  
think should be a pretty simple rewrite rule. I am currently trying to  
get this to work initially on my development machine, and I keep  
getting a 404 Not Found message from apache (version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher

I have added this to the end of my /etc/apache2/httpd.conf just before  
the last 2 includes at the end of the file (other/*.conf and WO  
apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written there.


I have studied the docs, the wiki docs and many examples. This looks  
like it should work, but I cannot for the life of me figure out why it  
does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Timo Hoepfner

Hi Kieran,

this is what we have in one of our apps. This is on Apache 1.3, though:

IfModule mod_rewrite.c
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteRule ^/pools/([^/]*)/([^/]*)/(.*)$ /cgi-bin/ 
WebObjects/Frontend.woa/wa/PDFileAccessDirectAction/poolFile?trader= 
$1pool=$2path=$3 [L,PT]

/IfModule

Timo

Am 16.04.2009 um 15:25 schrieb Kieran Kelleher:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http:// 
httpd.apache.org/docs/2.2/rewrite/), I was skeptical, but now I  
believe him! I need some help for what I think should be a pretty  
simple rewrite rule. I am currently trying to get this to work  
initially on my development machine, and I keep getting a 404 Not  
Found message from apache (version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=KieranKelleher


I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf and  
WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written there.


I have studied the docs, the wiki docs and many examples. This  
looks like it should work, but I cannot for the life of me figure  
out why it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/th-dev% 
40onlinehome.de


This email sent to th-...@onlinehome.de


___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Timo Hoepfner

Also see here:

http://wiki.objectstyle.org/confluence/display/WO/Web+Applications- 
Deployment-Apache


Timo

Am 16.04.2009 um 15:44 schrieb Timo Hoepfner:


Hi Kieran,

this is what we have in one of our apps. This is on Apache 1.3,  
though:


IfModule mod_rewrite.c
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteRule ^/pools/([^/]*)/([^/]*)/(.*)$ /cgi-bin/ 
WebObjects/Frontend.woa/wa/PDFileAccessDirectAction/poolFile?trader= 
$1pool=$2path=$3 [L,PT]

/IfModule

Timo

Am 16.04.2009 um 15:25 schrieb Kieran Kelleher:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http:// 
httpd.apache.org/docs/2.2/rewrite/), I was skeptical, but now I  
believe him! I need some help for what I think should be a pretty  
simple rewrite rule. I am currently trying to get this to work  
initially on my development machine, and I keep getting a 404 Not  
Found message from apache (version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=KieranKelleher


I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf  
and WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written there.


I have studied the docs, the wiki docs and many examples. This  
looks like it should work, but I cannot for the life of me figure  
out why it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/th-dev% 
40onlinehome.de


This email sent to th-...@onlinehome.de


___
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:
http://lists.apple.com/mailman/options/webobjects-dev/th-dev% 
40onlinehome.de


This email sent to th-...@onlinehome.de


___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Mike Schrag
if you're rewriting to wo instances, you need to make sure the  
ordering of your modules is right, too ... in 5.3 (i don't know about  
5.4), the order of the modules was wrong -- you have to make  
mod_webobjects come before mod_rewrite (iirc).


ms

On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http://httpd.apache.org/docs/2.2/rewrite/ 
), I was skeptical, but now I believe him! I need some help for what  
I think should be a pretty simple rewrite rule. I am currently  
trying to get this to work initially on my development machine, and  
I keep getting a 404 Not Found message from apache (version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher

I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf and  
WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written there.


I have studied the docs, the wiki docs and many examples. This looks  
like it should work, but I cannot for the life of me figure out why  
it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Kieran Kelleher
I am using WO 5.3 on leopard with apache 2.2.9. The wo module is  
coming before rewrite module in httpd.conf:
LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/ 
Apache2.2/mod_WebObjects.so

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Further investigation shows that each time I try to access the short  
URL, I see the following error in the apache error_log:
[Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not exist: / 
Library/WebServer/Documents/cgi-bin


So just maybe the rewrite rule is working but the result may be  
conflicting with mod_alias which has a scriptalias entry for the wo  
cgi-bin???


Does that ring any bells with anyone?

Kieran



On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:

if you're rewriting to wo instances, you need to make sure the  
ordering of your modules is right, too ... in 5.3 (i don't know  
about 5.4), the order of the modules was wrong -- you have to make  
mod_webobjects come before mod_rewrite (iirc).


ms

On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http://httpd.apache.org/docs/2.2/rewrite/ 
), I was skeptical, but now I believe him! I need some help for  
what I think should be a pretty simple rewrite rule. I am currently  
trying to get this to work initially on my development machine, and  
I keep getting a 404 Not Found message from apache (version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher

I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf and  
WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written there.


I have studied the docs, the wiki docs and many examples. This  
looks like it should work, but I cannot for the life of me figure  
out why it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.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:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to kieran_li...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Anjo Krank

Mine's commented out.

anjo:apache2 ak$ grep -i scriptalias *

httpd.conf:#ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) / 
Library/WebServer/CGI-Executables/$1


Cheers, Anjo



Am 16.04.2009 um 16:17 schrieb Kieran Kelleher:


scriptalias


___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Kieran Kelleher
I added an [R] option on the end of the rule to force an external  
redirect and it works, albeit the URL in the browser address bar  
becomes the ugly one. So, at least this is returning the page ... not  
let's see if I can make it do without an external redirect so that the  
short URL stays in the browser address bar  (since the marketing  
design spec wants the short URL)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [R]

/IfModule


On Apr 16, 2009, at 10:17 AM, Kieran Kelleher wrote:

I am using WO 5.3 on leopard with apache 2.2.9. The wo module is  
coming before rewrite module in httpd.conf:
LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/ 
Apache2.2/mod_WebObjects.so

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Further investigation shows that each time I try to access the short  
URL, I see the following error in the apache error_log:
[Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not  
exist: /Library/WebServer/Documents/cgi-bin


So just maybe the rewrite rule is working but the result may be  
conflicting with mod_alias which has a scriptalias entry for the wo  
cgi-bin???


Does that ring any bells with anyone?

Kieran



On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:

if you're rewriting to wo instances, you need to make sure the  
ordering of your modules is right, too ... in 5.3 (i don't know  
about 5.4), the order of the modules was wrong -- you have to make  
mod_webobjects come before mod_rewrite (iirc).


ms

On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http://httpd.apache.org/docs/2.2/rewrite/ 
), I was skeptical, but now I believe him! I need some help for  
what I think should be a pretty simple rewrite rule. I am  
currently trying to get this to work initially on my development  
machine, and I keep getting a 404 Not Found message from apache  
(version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher

I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf  
and WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written  
there.


I have studied the docs, the wiki docs and many examples. This  
looks like it should work, but I cannot for the life of me figure  
out why it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.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:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to kieran_li...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to kieran_li...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Kieran Kelleher
Hmm ... I tried removing the [R] option that I had just added to make  
this thing work and commenting out the scriptaliasmatch line. The  
rewrite rule does not work as I originally posted and webobjects still  
works fine (you would think the scriptalias line was needed, but it  
appears not)


On Apr 16, 2009, at 10:20 AM, Anjo Krank wrote:


Mine's commented out.

anjo:apache2 ak$ grep -i scriptalias *

httpd.conf:#ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$)  
/Library/WebServer/CGI-Executables/$1


Cheers, Anjo



Am 16.04.2009 um 16:17 schrieb Kieran Kelleher:


scriptalias




___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Kieran Kelleher
Finally! Searching the apache docs more, I found another option PT,  
the passthrough option, that specifically refers to this being needed  
for mod_alias or using mod_rewrite with any other modules that do URI- 
to-filename mapping or translation.


The final working rewrite rule is:

IfModule rewrite_module
# rewrite logging
RewriteLog /var/log/apache2/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [PT]

/IfModule

Thanks for the mind-prodding guys.

Now it is working in apache2 on my dev machine. Hopefully apache 1.3  
will be similar configuration when I deploy this feature in a few days.


Regards, Kieran

On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:

I added an [R] option on the end of the rule to force an external  
redirect and it works, albeit the URL in the browser address bar  
becomes the ugly one. So, at least this is returning the page ...  
not let's see if I can make it do without an external redirect so  
that the short URL stays in the browser address bar  (since the  
marketing design spec wants the short URL)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [R]

/IfModule


On Apr 16, 2009, at 10:17 AM, Kieran Kelleher wrote:

I am using WO 5.3 on leopard with apache 2.2.9. The wo module is  
coming before rewrite module in httpd.conf:
LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/ 
Apache2.2/mod_WebObjects.so

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Further investigation shows that each time I try to access the  
short URL, I see the following error in the apache error_log:
[Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not  
exist: /Library/WebServer/Documents/cgi-bin


So just maybe the rewrite rule is working but the result may be  
conflicting with mod_alias which has a scriptalias entry for the wo  
cgi-bin???


Does that ring any bells with anyone?

Kieran



On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:

if you're rewriting to wo instances, you need to make sure the  
ordering of your modules is right, too ... in 5.3 (i don't know  
about 5.4), the order of the modules was wrong -- you have to make  
mod_webobjects come before mod_rewrite (iirc).


ms

On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http://httpd.apache.org/docs/2.2/rewrite/ 
), I was skeptical, but now I believe him! I need some help for  
what I think should be a pretty simple rewrite rule. I am  
currently trying to get this to work initially on my development  
machine, and I keep getting a 404 Not Found message from apache  
(version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher

I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf  
and WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/ 
wa/PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written  
there.


I have studied the docs, the wiki docs and many examples. This  
looks like it should work, but I cannot for the life of me figure  
out why it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.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:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to kieran_li...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to kieran_li...@mac.com


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev

Re: [OT] Apache rewrite rule

2009-04-16 Thread Tim Worman

Kieran et al:

I just went through some rewrite stuff although it was more related to  
just getting multiple apps working at different virtual hosts. This  
site has a really nicely done mod_rewrite cheat sheet (PDF):


http://www.addedbytes.com/apache/mod_rewrite-cheat-sheet

Also, after your RewriteLog command you could add:

RewriteLogLevel 9

It does help a little with the debugging. I don't think anything over  
'2' is recommended in deployment but you'll learn a lot by amping it  
up as high as it can go while you're troubleshooting this stuff. Sorry  
if I'm just spewing stuff you already knew about.


Tim
UCLA GSEIS

On Apr 16, 2009, at 7:50 AM, Kieran Kelleher wrote:

Finally! Searching the apache docs more, I found another option PT,  
the passthrough option, that specifically refers to this being  
needed for mod_alias or using mod_rewrite with any other modules  
that do URI-to-filename mapping or translation.


The final working rewrite rule is:

IfModule rewrite_module
# rewrite logging
RewriteLog /var/log/apache2/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [PT]

/IfModule

Thanks for the mind-prodding guys.

Now it is working in apache2 on my dev machine. Hopefully apache 1.3  
will be similar configuration when I deploy this feature in a few  
days.


Regards, Kieran

On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:

I added an [R] option on the end of the rule to force an external  
redirect and it works, albeit the URL in the browser address bar  
becomes the ugly one. So, at least this is returning the page ...  
not let's see if I can make it do without an external redirect so  
that the short URL stays in the browser address bar  (since the  
marketing design spec wants the short URL)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [R]

/IfModule


On Apr 16, 2009, at 10:17 AM, Kieran Kelleher wrote:

I am using WO 5.3 on leopard with apache 2.2.9. The wo module is  
coming before rewrite module in httpd.conf:
LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/ 
Apache2.2/mod_WebObjects.so

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Further investigation shows that each time I try to access the  
short URL, I see the following error in the apache error_log:
[Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not  
exist: /Library/WebServer/Documents/cgi-bin


So just maybe the rewrite rule is working but the result may be  
conflicting with mod_alias which has a scriptalias entry for the  
wo cgi-bin???


Does that ring any bells with anyone?

Kieran



On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:

if you're rewriting to wo instances, you need to make sure the  
ordering of your modules is right, too ... in 5.3 (i don't know  
about 5.4), the order of the modules was wrong -- you have to  
make mod_webobjects come before mod_rewrite (iirc).


ms

On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http://httpd.apache.org/docs/2.2/rewrite/ 
), I was skeptical, but now I believe him! I need some help for  
what I think should be a pretty simple rewrite rule. I am  
currently trying to get this to work initially on my development  
machine, and I keep getting a 404 Not Found message from  
apache (version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher

I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf  
and WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/ 
wa/PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written  
there.


I have studied the docs, the wiki docs and many examples. This  
looks like it should work, but I cannot for the life of me  
figure out why it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.com



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev

Re: [OT] Apache rewrite rule

2009-04-16 Thread Kieran Kelleher

Tim,

Thanks a lot. I love cheatsheets and that's a really useful one :-)

Kieran

On Apr 16, 2009, at 12:36 PM, Tim Worman wrote:


Kieran et al:

I just went through some rewrite stuff although it was more related  
to just getting multiple apps working at different virtual hosts.  
This site has a really nicely done mod_rewrite cheat sheet (PDF):


http://www.addedbytes.com/apache/mod_rewrite-cheat-sheet

Also, after your RewriteLog command you could add:

RewriteLogLevel 9

It does help a little with the debugging. I don't think anything  
over '2' is recommended in deployment but you'll learn a lot by  
amping it up as high as it can go while you're troubleshooting this  
stuff. Sorry if I'm just spewing stuff you already knew about.


Tim
UCLA GSEIS

On Apr 16, 2009, at 7:50 AM, Kieran Kelleher wrote:

Finally! Searching the apache docs more, I found another option PT,  
the passthrough option, that specifically refers to this being  
needed for mod_alias or using mod_rewrite with any other modules  
that do URI-to-filename mapping or translation.


The final working rewrite rule is:

IfModule rewrite_module
# rewrite logging
RewriteLog /var/log/apache2/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [PT]

/IfModule

Thanks for the mind-prodding guys.

Now it is working in apache2 on my dev machine. Hopefully apache  
1.3 will be similar configuration when I deploy this feature in a  
few days.


Regards, Kieran


___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Chuck Hill


On Apr 16, 2009, at 7:50 AM, Kieran Kelleher wrote:

Finally! Searching the apache docs more, I found another option PT,  
the passthrough option, that specifically refers to this being  
needed for mod_alias or using mod_rewrite with any other modules  
that do URI-to-filename mapping or translation.


Yes.  The Last flag may also result is a small speed improvement  
unless you are double re-writing: [LPT]


Chuck





The final working rewrite rule is:

IfModule rewrite_module
# rewrite logging
RewriteLog /var/log/apache2/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [PT]

/IfModule

Thanks for the mind-prodding guys.

Now it is working in apache2 on my dev machine. Hopefully apache 1.3  
will be similar configuration when I deploy this feature in a few  
days.


Regards, Kieran

On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:

I added an [R] option on the end of the rule to force an external  
redirect and it works, albeit the URL in the browser address bar  
becomes the ugly one. So, at least this is returning the page ...  
not let's see if I can make it do without an external redirect so  
that the short URL stays in the browser address bar  (since the  
marketing design spec wants the short URL)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [R]

/IfModule


On Apr 16, 2009, at 10:17 AM, Kieran Kelleher wrote:

I am using WO 5.3 on leopard with apache 2.2.9. The wo module is  
coming before rewrite module in httpd.conf:
LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/ 
Apache2.2/mod_WebObjects.so

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Further investigation shows that each time I try to access the  
short URL, I see the following error in the apache error_log:
[Thu Apr 16 10:12:15 2009] [error] [client ::1] File does not  
exist: /Library/WebServer/Documents/cgi-bin


So just maybe the rewrite rule is working but the result may be  
conflicting with mod_alias which has a scriptalias entry for the  
wo cgi-bin???


Does that ring any bells with anyone?

Kieran



On Apr 16, 2009, at 10:08 AM, Mike Schrag wrote:

if you're rewriting to wo instances, you need to make sure the  
ordering of your modules is right, too ... in 5.3 (i don't know  
about 5.4), the order of the modules was wrong -- you have to  
make mod_webobjects come before mod_rewrite (iirc).


ms

On Apr 16, 2009, at 9:25 AM, Kieran Kelleher wrote:


Hello list,

Well when Brian Moore said mod_rewrite was voodoo (http://httpd.apache.org/docs/2.2/rewrite/ 
), I was skeptical, but now I believe him! I need some help for  
what I think should be a pretty simple rewrite rule. I am  
currently trying to get this to work initially on my development  
machine, and I keep getting a 404 Not Found message from  
apache (version 2.2.9).


The rule is supposed to take convert URLs like this :
http://localhost/purl/KieranKelleher

and rewrite them like this (on my dev machine):
http://localhost/cgi-bin/WebObjects/cheetah.woa/-52040/wa/PurlAction/purl?p=KieranKelleher

I have added this to the end of my /etc/apache2/httpd.conf just  
before the last 2 includes at the end of the file (other/*.conf  
and WO apache.conf)


IfModule rewrite_module
# rewrite logging
RewriteLog /tmp/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/ 
wa/PurlAction/purl?p=$1

/IfModule

I can confirm that when I restarted apache it creates the /tmp/ 
rewrite.log if it does not exist, however nothing gets written  
there.


I have studied the docs, the wiki docs and many examples. This  
looks like it should work, but I cannot for the life of me  
figure out why it does not work :-(


Any clues or hints would be appreciated.

Thanks, Kieran
___
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:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com

This email sent to msch...@mdimension.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:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to kieran_li...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com

This email sent to kieran_li

Re: [OT] Apache rewrite rule

2009-04-16 Thread Kieran Kelleher
Thanks Chuck. I added [L] makes sense. Also should your example  
separate options with commas ... like [L,PT] ?


-Kieran

On Apr 16, 2009, at 2:22 PM, Chuck Hill wrote:



On Apr 16, 2009, at 7:50 AM, Kieran Kelleher wrote:

Finally! Searching the apache docs more, I found another option PT,  
the passthrough option, that specifically refers to this being  
needed for mod_alias or using mod_rewrite with any other modules  
that do URI-to-filename mapping or translation.


Yes.  The Last flag may also result is a small speed improvement  
unless you are double re-writing: [LPT]


Chuck





The final working rewrite rule is:

IfModule rewrite_module
# rewrite logging
RewriteLog /var/log/apache2/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [PT]

/IfModule

Thanks for the mind-prodding guys.

Now it is working in apache2 on my dev machine. Hopefully apache  
1.3 will be similar configuration when I deploy this feature in a  
few days.


Regards, Kieran

On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:



___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: [OT] Apache rewrite rule

2009-04-16 Thread Chuck Hill


On Apr 16, 2009, at 11:54 AM, Kieran Kelleher wrote:

Thanks Chuck. I added [L] makes sense. Also should your example  
separate options with commas ... like [L,PT] ?


It has been so long that I had to look it up.  I don't recall the  
comma, but I have it:


[last,passthrough]

Chuck






-Kieran

On Apr 16, 2009, at 2:22 PM, Chuck Hill wrote:



On Apr 16, 2009, at 7:50 AM, Kieran Kelleher wrote:

Finally! Searching the apache docs more, I found another option  
PT, the passthrough option, that specifically refers to this being  
needed for mod_alias or using mod_rewrite with any other modules  
that do URI-to-filename mapping or translation.


Yes.  The Last flag may also result is a small speed improvement  
unless you are double re-writing: [LPT]


Chuck





The final working rewrite rule is:

IfModule rewrite_module
# rewrite logging
RewriteLog /var/log/apache2/rewrite.log

# PURL feature
RewriteEngine On
RewriteRule ^/purl/(.*)$ /cgi-bin/WebObjects/cheetah.woa/-52040/wa/ 
PurlAction/purl?p=$1 [PT]

/IfModule

Thanks for the mind-prodding guys.

Now it is working in apache2 on my dev machine. Hopefully apache  
1.3 will be similar configuration when I deploy this feature in a  
few days.


Regards, Kieran

On Apr 16, 2009, at 10:28 AM, Kieran Kelleher wrote:






--
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their  
overall knowledge of WebObjects or who are trying to solve specific  
problems.

http://www.global-village.net/products/practical_webobjects






___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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