Jump to content

Transforming /category/page?some=request to /category/page/request


Recommended Posts

Hi,

 

I'm running CodeIgniter with this htaccess:

 

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>

 

The problem is PayPal, which uses GET requests to transmit information during Express Checkout. When a customer cancels an order, they go to basket/review/?token=Something&PayerID=SomethingElse.

 

This works fine.

 

What does not work is when the user cancels the PayPal transaction, in which case PayPal transfers them to basket/cancel/?token=Something. I've isolated the issue, and it is resolved if &Anything is appended to the URL.

 

So, basically, I want to scan for GET requests, and then add &A to the end of them. I really don't know how to do this, particularly with my existing rewrite rule. Either that, or transform all GET request in to the manner described in the title, such as with a hard 301 redirect.

 

Any help is greatly appreciated.

 

Cheers,

Alex

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.