Forum Moderators: phranque
I'm rewriting URLs to integrate an Amazon aStore via a web proxy into my site (to get greater flexibility than with iframes).
Everything's fine minus the last bit: When you click on an "update cart" link it comes back with the default store page, not the updated cart.
I've traced it down to a URL rewrite issue. Clicking on "update cart" triggers a link of the form
[local.mysite.com...]
which currently only runs on my local server (hence the 'local').
My .htaccess contains the following to rewrite any links with 'ast' (Amazon Store):
RewriteRule ^ast/(.*)$ /proxy/proxy-index.php?q=$1 [L,QSA]
This sends any link with 'ast' in it to the proxy script. QSA should preserve any url parameters.
However, when I log the rewrite process for that particular link I get this entry:
split uri=/proxy/proxy-index.php?q=my-store-id/cart/modify/another-id-here -> uri=/proxy/proxy-index.php, args=q=my-store-id/cart/modify/another-id-here&Item.1.Quantity=1&Item.1.CartItemId=U39TZ#*$!MYPT9T&pngImage.x=23&pngImage.y=7&pngImage=Go
Note the '&' which follows 'another-id-here' which, in the original link posted above, has been a '?'.
Hence the link parameters are not recognised and Amazon sends back the default store page.
My question is where does the '&' come from?
My setup works for links like:
[local.mysite.com...]
Thanks for your help!