Jump to content

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


alex3

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.