On Apr 12, 2010, at 10:32 PM, ute Hoffmann wrote:

> Hi,
> this seems to be very tricky.
> 
> So I found this in the net which seems to be roughly what I need:
> 
> RewriteCond %{QUERY_STRING} ^prod=([^&]+)$
> RewriteRule ^.*$ /%.html [R=301,L]
> 
> Now what I would need is two conditions, right?
> 
> a) The query string condition and 
> b) the rest of the path rewriting
> 
> Is there a way to have two query conditions for one rule?

You don't need that.  *All* rules in your config file are applied to a given 
URL in sequential order unless you specifically tell it to stop with the [last] 
directive (there are other directives that do it as well IIRC).


> Or do I have to change that in two rules first the  ^/appname(.*)/(.*)/(.*) 
> and
> after that put the query string var into that URL?
> 
> Or will that work:
> RewriteCond %{QUERY_STRING} ^apn=([^&]+)$
> RewriteRule ^/appname(.*)/(.*)/(.*)% 
> /cgi-bin/WebObjects/appname.woa/$1/wa/ttcms?a1=%1&a2=%2 [last,passthrough]

Something along these lines should work.


> Or is the Use of % different? Do I need $ in both lines and if yes, is that 
> possible?


I'm not sure what % is signifying here.  "$" means "end of the line" to me, so 
it certainly makes sense to me to try to match the end of the query string in 
the first case and the end of the URL in the second.


sacha


-- 
Sacha Michel Mallais             Code Sculptor
Global Village Consulting Inc.   http://www.global-village.net/
PGP Key ID: 7D757B65             AIM: smallais
Roses are #FF0000, violets are #0000FF, all my base are belong to you.


 _______________________________________________
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