• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mod_Rewrite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mod_Rewrite


  • Subject: Re: Mod_Rewrite
  • From: John Huss <email@hidden>
  • Date: Wed, 23 Mar 2011 09:20:00 -0500

In httpd.conf you have to load the rewrite module after the WO module:

LoadModule WebObjects_module            /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so

In your apache virtual hosts conf file:

        <IfModule mod_rewrite.c>
                RewriteCond %{REQUEST_METHOD} ^TRACE
                RewriteRule .* - [F]
                RewriteRule ^/app(.*)$ /cgi-bin/WebObjects/MyApp.woa$1 [PT,L]
                RewriteEngine On
        </IfModule>

In your app's Properties file:

# URL rewriting

er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/MyApp.woa

er.extensions.ERXApplication.replaceApplicationPath.replace=/app


John


On Wed, Mar 23, 2011 at 1:54 AM, Ken - Watermark Studios <email@hidden> wrote:
I know this is a topic that has been exhausted extensively, but I need some help finding resources that address my difficulty with mod_rewrite and wo.

I notice that a number of tutorials explain how to mod_rewrite direct actions for shorter URLs, but is there a way to just generically remove the "cgi-bin/WebObjects/App.woa" portion of the URL? I don't mind the "wo/" or "wa/" part, but it would be nice to just have "www.mysite.com/wo/dynamic_stuff" or "www.mysite.com/wa/direct_action" especially for tracking purposes.

I've read a number of articles about this, but either they only address the direct actions and require some application class imports or they just don't seem to work.

Btw, I'm running Centos 5, WebObjects 5.4, and Apache2.

Thanks,

Ken Anderson

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Mod_Rewrite (From: Ken - Watermark Studios <email@hidden>)

  • Prev by Date: Error in Loading Images
  • Next by Date: Re: EO inheritance + Oracle
  • Previous by thread: Re: Mod_Rewrite
  • Next by thread: Error in Loading Images
  • Index(es):
    • Date
    • Thread