• 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: apache RewriteEngine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: apache RewriteEngine


  • Subject: Re: apache RewriteEngine
  • From: Fabian Peters <email@hidden>
  • Date: Sun, 29 Jan 2012 19:10:31 +0100

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@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


  • Follow-Ups:
    • Re: apache RewriteEngine
      • From: Jesse Tayler <email@hidden>
References: 
 >apache RewriteEngine (From: Jesse Tayler <email@hidden>)

  • Prev by Date: apache RewriteEngine
  • Next by Date: Re: apache RewriteEngine
  • Previous by thread: apache RewriteEngine
  • Next by thread: Re: apache RewriteEngine
  • Index(es):
    • Date
    • Thread