Title: Nginx code to redirection plugin
Last modified: March 7, 2020

---

# Nginx code to redirection plugin

 *  Resolved [Pubudu](https://wordpress.org/support/users/wpprouser/)
 * (@wpprouser)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/nginx-code-to-redirection-plugin/)
 * Hi,
 * I am being asked to do add the following code to nginx config file. But I am 
   not sure how to do that. Is there anyway I can achieve this with Redirection 
   plugin?
 *     ```
       if ($arg_wc-api != "" ) {
           return 301 "http://YOURSITE.com/wp-content/plugins/woocommerce-to-easydigitaldownloads/software.php?$args";
       }
       ```
   
 * Thank you.
    -  This topic was modified 6 years, 2 months ago by [Pubudu](https://wordpress.org/support/users/wpprouser/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/nginx-code-to-redirection-plugin/#post-12519379)
 * Why are you being asked to do that, and what does it do?
 *  Thread Starter [Pubudu](https://wordpress.org/support/users/wpprouser/)
 * (@wpprouser)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/nginx-code-to-redirection-plugin/#post-12519421)
 * Hi John,
 * Thank you very much for the quick reply.
 * I am trying to migrate a site from WooCommerce to Easy Digital Downloads. And
   I have to migrate WooCommerce API Manager to Easy Digital Downloads Software 
   Licensing module. I found a script to do that. But in order to do that I need
   to use that code in the nginx.
 * Here is the script – [https://github.com/rtCamp/woocommerce-to-easydigitaldownloads](https://github.com/rtCamp/woocommerce-to-easydigitaldownloads)
 * And here is what I need to achieve – [https://github.com/rtCamp/woocommerce-to-easydigitaldownloads/blob/master/software.md](https://github.com/rtCamp/woocommerce-to-easydigitaldownloads/blob/master/software.md)
 * Any help would be much appreciated.
 * Thank you.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/nginx-code-to-redirection-plugin/#post-12519451)
 * Based on [this](https://github.com/rtCamp/woocommerce-to-easydigitaldownloads/blob/master/software.md)
   it seems like you need 3 redirects (activation, status, upgrade), which are things
   you can do with Redirection.
 * I don’t know what the Nginx statement is doing.
 * You’ll need to experiment and see what works.
 *  Thread Starter [Pubudu](https://wordpress.org/support/users/wpprouser/)
 * (@wpprouser)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/nginx-code-to-redirection-plugin/#post-12519585)
 * Hi John,
 * Yes it seems possible to do that. I will try that.
 * Thank you very much for the help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Nginx code to redirection plugin’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Pubudu](https://wordpress.org/support/users/wpprouser/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/nginx-code-to-redirection-plugin/#post-12519585)
 * Status: resolved