Redirect to page based on URL parameter
-
Redirection: Plugin: 2.1.0
WordPress: 4.5.17 (single)
PHP: 5.6.40
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
JavaScript: https://www.carenetfamilyresources.org/wp-content/plugins/redirection/redirection.js
REST API: https://www.carenetfamilyresources.org/wp-json/Installed the All In One Redirection tool. Our use case is redirecting the return URL from a payment gateway within an iframe. The form posts and works fine except error messages are not user friendly. A valid success transaction will be https://www.carenetfamilyresources.org/error/?Result=0&Resp…(plus other parameters).
An invalid/declined transaction will look like this:
https://www.carenetfamilyresources.org/error/?Result=12&RespMSG=Decline:%20Invalid%20Trans%20-%20Invalid%20transaction%20(%20%20%20%20DECLINE%20%20%20%20%20)&AuthCode=05&PNRef=2881909&LastFour=0114&token=&ExpDate=0819&CardType=MASTERCARD&TotalAmt=1&InvNum=&HostedPageKey=4787&Name=Jeff%20Hunter&Time=4/27/2019%2010:33%20AMhttps://www.carenetfamilyresources.org/error/?Result=
Would be the only common string between them. If the result=0, then we’d want to use the 301 redirect to display the thank you page. If the result = 12, then we want to display the …/denied page (which would tell them what to do to correct the transaction), any other result codes, display …/generalerror page.I was trying to setup a redirection to deal with the above and saw where I could specify a REGEX. There is a REGEX check box (see screenshot) but I don’t where to put a REGEX in the plugin.
https://my.jetscreenshot.com/12412/20190427-yaqi-111kb.jpgIs it possible to setup a REGEX rule for the .htaccess file that would route ?Result=0 to the …/thankyou page, &Result12 to …/denied page? Everything else to …/generalerror page?
Thanks in advance!
The page I need help with: [log in to see the link]
- The topic ‘Redirect to page based on URL parameter’ is closed to new replies.