Answers.Body: <p>I ran into this problem today, and found my solution.</p>
  
  <p>Folks who are saying that you can change the IPN URL on an existing Paypal recurring payment are incorrect; you can't, you can only change the IPN URL for future notifications.</p>
  
  <p>I was able to use a rewrite to redirect from Drupal to Wordpress, as follows:</p>
  
  <pre><code>RewriteRule ^sites/all/modules/civicrm/extern/ipn.php$ https://mysite.org/wp-content/plugins/civicrm/civicrm/extern/ipn.php [R=307,L]
  </code></pre>
  
  <p>The magic is the <code>R=307</code>.  A 307 redirect indicates that a POST request must be resent as a POST.  Otherwise you lose the IPN data.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-31T14:17:24.213Z
Answers.Text: hi Jon, can you please also include a rule for nginx, then I can accept it as an answer? many thanks.
Answers.UserDisplayName: Tapash
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T14:52:25.233Z
Answers.Text: Note: more recent CiviCRM versions will have IPN urls like `/civicrm/payment/ipn/NNN` instead.
Answers.UserDisplayName: artfulrobot
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T15:04:03.483Z
Answers.Text: Also, I wonder if a 308 would be better. Supposed to behave the same way but tells client it's a permanent redirect. FWIW...
Answers.UserDisplayName: artfulrobot
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-30T19:55:43.930Z
Answers.LastActivityDate: 2015-07-30T19:55:43.930Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>PayPal stores these URLs so there is no way to change this in CiviCRM, nor any other application in fact.</p>
  
  <p>There is a way to change the URL via PayPal's site, however. For details how to do that, refer to <a href="https://stackoverflow.com/questions/11454900/change-the-ipn-url-on-existing-subscription">Change the IPN url on existing subscription</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T08:25:02.340Z
Answers.Text: I have already looked at this but seems paypal still did not facilitate to change the existing IPN URLs.
Answers.UserDisplayName: Tapash
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-12T15:29:53.907Z
Answers.LastActivityDate: 2015-04-12T15:29:53.907Z
Answers.LastEditDate: 2017-05-23T12:38:59.763Z
Answers.UserDisplayName: Hershel
Answers.Body: <p>You can actually change the IPN URL in PayPal settings. For previously failed IPN calls to a historic URL you can resend the messages from PayPal's control panel to the new URL.</p>
  
  <p>In PayPal.
  Profile and Settings -> Selling Preferences -> Instant Payment Notification (IPN)</p>
  
  <p>Change the notification URL here. Then click on the link to IPN history and run a search (this only shows the last 28 days worth though for me).</p>
  
  <p>With the results showing Check a box at the top of the list which says apply profile and there will be a drop down box to resend the IPNs to the new URL.</p>
  
  <p>Simples</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-30T18:25:58.543Z
Answers.Text: Changing the IPN notification URL unfortunately does NOT update existing recurring payments.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-21T11:22:45.200Z
Answers.LastActivityDate: 2015-05-21T11:22:45.200Z
Answers.UserDisplayName: Jon-man
Answers.Body: <p>Civi does not have the facility to do this. Your best bet is to check and see if you can do this in paypal directly or via the API. You might also experiment with setting up a redirect from the old to the new (not sure if this will work, since it is a POST request from paypal servers)</p>
  
  <p>Please report back your findings. I suspect more and more folks will start running into this issue</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-12T15:19:57.567Z
Answers.LastActivityDate: 2015-04-12T15:19:57.567Z
Answers.UserDisplayName: Donald Lobo
Body: <p>I would like to move my civi install to a new domain. I am able to change paypal IPN to new domain. But for all previous recurring contribution via paypal, i can't change the urls. what can be done?</p>
  
Tags: <drupal><payment-processor>
Title: How to change Paypal IPN URL when migrating Civicrm onto a new domain?
ThreadText: # How to change Paypal IPN URL when migrating Civicrm onto a new domain?
  
  (Asked by: username_0 on 2015-04-12)
  
  I would like to move my civi install to a new domain. I am able to change paypal IPN to new domain. But for all previous recurring contribution via paypal, i can't change the urls. what can be done?
  
  **Tags:** drupal, payment-processor
  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_1 on 2015-07-30. Score: 7
  
  I ran into this problem today, and found my solution.
  
  Folks who are saying that you can change the IPN URL on an existing Paypal recurring payment are incorrect; you can't, you can only change the IPN URL for future notifications.
  
  I was able to use a rewrite to redirect from Drupal to Wordpress, as follows:
  
  ```
  RewriteRule ^sites/all/modules/civicrm/extern/ipn.php$ https://mysite.org/wp-content/plugins/civicrm/civicrm/extern/ipn.php [R=307,L]
  
  ```
  
  The magic is the `R=307`. A 307 redirect indicates that a POST request must be resent as a POST. Otherwise you lose the IPN data.
  
  > **Comments:**
  > **username_0**: hi Jon, can you please also include a rule for nginx, then I can accept it as an answer? many thanks.  
  > **username_2**: Note: more recent CiviCRM versions will have IPN urls like `/civicrm/payment/ipn/NNN` instead.  
  > **username_2**: Also, I wonder if a 308 would be better. Supposed to behave the same way but tells client it's a permanent redirect. FWIW...  
  
  ---
  
  ### Answer by username_3 on 2015-04-12. Score: 4
  
  PayPal stores these URLs so there is no way to change this in CiviCRM, nor any other application in fact.
  
  There is a way to change the URL via PayPal's site, however. For details how to do that, refer to [Change the IPN url on existing subscription](https://stackoverflow.com/questions/11454900/change-the-ipn-url-on-existing-subscription)
  
  > **Comments:**
  > **username_0**: I have already looked at this but seems paypal still did not facilitate to change the existing IPN URLs.  
  
  ---
  
  ### Answer by username_4 on 2015-05-21. Score: 2
  
  You can actually change the IPN URL in PayPal settings. For previously failed IPN calls to a historic URL you can resend the messages from PayPal's control panel to the new URL.
  
  In PayPal.
  Profile and Settings -> Selling Preferences -> Instant Payment Notification (IPN)
  
  Change the notification URL here. Then click on the link to IPN history and run a search (this only shows the last 28 days worth though for me).
  
  With the results showing Check a box at the top of the list which says apply profile and there will be a drop down box to resend the IPNs to the new URL.
  
  Simples
  
  > **Comments:**
  > **username_1**: Changing the IPN notification URL unfortunately does NOT update existing recurring payments.  
  
  ---
  
  ### Answer by username_5 on 2015-04-12. Score: 1
  
  Civi does not have the facility to do this. Your best bet is to check and see if you can do this in paypal directly or via the API. You might also experiment with setting up a redirect from the old to the new (not sure if this will work, since it is a POST request from paypal servers)
  
  Please report back your findings. I suspect more and more folks will start running into this issue
  
  
  ---
  
  