On Apr 12, 2010, at 3:58 PM, Sacha Michel Mallais wrote:

On Apr 12, 2010, at 3:33 PM, Chuck Hill wrote:

On Apr 12, 2010, at 3:17 PM, ute Hoffmann wrote:

Hi,
does anyone see why apache will not let me have a rewrite rule like this:

RewriteRule ^/appname(.*)/(.*)/(.*)?apn=(.*)$ /cgi-bin/WebObjects/ appname.woa/$4/wa/ttcms?a1=$1&a2=$2 [last,passthrough]

RewriteRule ^/appname\.(.+)/(.+)/(.+)?apn=(.+) /cgi-bin/WebObjects/ appname.woa/$4/wa/ttcms?a1=$1&a2=$2 [last,passthrough]

Neither of these will likely work the way you are expecting. You cannot use RewriteRule to rewrite GET params (after the "?"). Before the rewrite engine gets the URL, the stuff after the ? will be stripped out and put into the QUERY_STRING (IIRC) env var.

There are Rewrite engine directives that will give you access to env vars and allow you to manipulate them, but I can't remember them off the top of my head.


Or you can change the URL to put the parameter(s) in the path:

RewriteRule ^/appname\.(.+)/(.+)/(.+)/apn=(.+) /cgi-bin/WebObjects/ appname.woa/$4/wa/ttcms?a1=$1&a2=$2 [last,passthrough]

If that is an option...



--
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-deploy mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to