I’ve migrated my website to a new domain, and now facing some difficulties.
After someone purchases and pays on an external website, he is returned to the old site, where he is redirected to the new website with the following rule:
RewriteCond %{HTTP_HOST} !^oldsite\.com$
RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]
My problem is that when he is redirected to the new domain, he loses all the data that is returned about the purchase (status and so on).
I figured I can do two things – process the purchase on the old domain (I can’t currently change the return URL from the payment company). in order to do that, I need to exclude the specific URL, which I tried to do by adding this before the previous code:
RewriteCond %{HTTP_HOST} !^purchase\_online\_td.\php$
But nothing, not working. tried many variations.
So I need either to solve the POST data not redirected, or the exclusion of the URL.
Either will be great due to the urgency of the matter…
Thanks for your thoughts.
Try removing the underscore escapes, as you don’t need them. Also, you had the wrong variable