Title: Plugin Redirection Error
Last modified: November 15, 2018

---

# Plugin Redirection Error

 *  Resolved [stajan](https://wordpress.org/support/users/stajan/)
 * (@stajan)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-redirection-error-2/)
 * Hello,
 * I get an error when adding a redirect with the plugin “Redirection”.
 * Error from simple-history/loggers/Plugin_Redirection.php:
 *     ```
       Error: Unexpected token < in JSON at position 0
       Action: redirection/v1/redirect/1651/ POST
       Params: {"id":1651,"url":"/o-miedzi/cykl-eksploatacyjny","title":"","regex":false,"match_type":"header","action_type":"url","position":1049,"group_id":1,"action_code":301,"action_data":{"name":"Host","value":"copperalliance.pl","regex":false,"url_from":"https://copperalliance.pl/srodowisko-i-zdrowie/cykl-zycia-produktu","url_notfrom":""}}
       Code: 200 OK
       Raw: <br />
       <b>Notice</b>:  Undefined index: url in <b>/var/www/copperalliance.eu/wwwroot/public/plugins/simple-history/loggers/Plugin_Redirection.php</b> on line <b>329</b><br />
       {"item":{"id":1651,"url":"\/o-miedzi\/cykl-eksploatacyjny","action_code":301,"action_type":"url","action_data":{"url_from":"https:\/\/copperalliance.pl\/srodowisko-i-zdrowie\/cykl-zycia-produktu","url_notfrom":"","regex":false,"name":"Host","value":"copperalliance.pl"},"match_type":"header","title":"","hits":0,"regex":false,"group_id":1,"position":1049,"last_access":"-","enabled":true}}
   
       Error: Unexpected token < in JSON at position 0
       Action: redirection/v1/redirect/1651/ POST
       Params: {"id":1651,"url":"/o-miedzi/cykl-eksploatacyjny","title":"","regex":false,"match_type":"header","action_type":"url","position":1049,"group_id":1,"action_code":301,"action_data":{"name":"Host","value":"copperalliance.pl","regex":false,"url_from":"https://copperalliance.pl/srodowisko-i-zdrowie/cykl-zycia-produktu/","url_notfrom":""}}
       Code: 200 OK
       Raw: <br />
       <b>Notice</b>:  Undefined index: url in <b>/var/www/copperalliance.eu/wwwroot/public/plugins/simple-history/loggers/Plugin_Redirection.php</b> on line <b>329</b><br />
       {"item":{"id":1651,"url":"\/o-miedzi\/cykl-eksploatacyjny","action_code":301,"action_type":"url","action_data":{"url_from":"https:\/\/copperalliance.pl\/srodowisko-i-zdrowie\/cykl-zycia-produktu\/","url_notfrom":"","regex":false,"name":"Host","value":"copperalliance.pl"},"match_type":"header","title":"","hits":0,"regex":false,"group_id":1,"position":1049,"last_access":"-","enabled":true}}
       ```
   

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

 *  Plugin Author [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-redirection-error-2/#post-10882843)
 * Thanks for the report! I’ll take a look at it.
 *  Thread Starter [stajan](https://wordpress.org/support/users/stajan/)
 * (@stajan)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-redirection-error-2/#post-10902597)
 * Dear Pär Thernström,
 * Sorry to disturb you. Did you had the time to look at this issue? I can also 
   have a look and create a merge request if you want.
 * Greetings,
    stajan
 *  Plugin Author [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-redirection-error-2/#post-10904843)
 * Not yet I’m afraid. If you have the time and energy a pull request would be very
   welcome! The source code is avaialable here btw:
 * [https://github.com/bonny/WordPress-Simple-History](https://github.com/bonny/WordPress-Simple-History)
 * After a quick look all that is probably needed is a `isset()` check for the variable…
 *  Thread Starter [stajan](https://wordpress.org/support/users/stajan/)
 * (@stajan)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-redirection-error-2/#post-10905921)
 * Dear Pär Thernström,
 * There is only an url if you select the url match type. I’ve you send you a pull
   request where it compares the action data instead.
 * Greetings,
    stajan
 *  Plugin Author [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * (@eskapism)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-redirection-error-2/#post-10921386)
 * Great, thanks! Will be included in the next update.

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

The topic ‘Plugin Redirection Error’ is closed to new replies.

 * ![](https://ps.w.org/simple-history/assets/icon.svg?rev=3225008)
 * [Simple History – Track, Log, and Audit WordPress Changes](https://wordpress.org/plugins/simple-history/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-history/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-history/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-history/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-history/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-history/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Pär Thernström](https://wordpress.org/support/users/eskapism/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/plugin-redirection-error-2/#post-10921386)
 * Status: resolved