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      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/lists.fabian%40e-lumo.com
> 
> This email sent to [email protected]


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

This email sent to [email protected]

Reply via email to