griz44

msg:4549043 | 5:12 pm on Feb 26, 2013 (gmt 0) |
I found it -of course only after posting for help The error was $1 instead of %1 in the RewriteRule: RewriteEngine on RewriteCond %{REQUEST_URI} ^/store/agora.cgi RewriteCond %{QUERY_STRING} cart_id=[^\&]+\&p_id=([^\&]+) RewriteRule ^(.*)$ http://www.example.com/store/agora.cgi?user2=yes&p_id=%1&xm=on&ppinc=1a [R=301,L]
|
g1smd

msg:4549050 | 5:37 pm on Feb 26, 2013 (gmt 0) |
Move the REQUEST_URI pattern from the condition into the rule in place of (.*) Ampersand does not need to be escaped. Anchor the start of the QUERY_STRING pattern with (^|&) and adjust %1 to %2 in the rule.
|
griz44

msg:4549138 | 6:56 pm on Feb 26, 2013 (gmt 0) |
Thanks for the response. What I have now works. I think I tried putting the REQUEST_URI pattern in place of the (.*) But I will try it again now that I'm using % instead of $ for the variable. Thanks for the (^|&) anchor, I was wondering about that.
|
|