Batch redirection creation

8 months ago | waltervos (Member) | |

Hey,

The redirection plugin works fantastic for me. However, I have one problem with it. I can't seem to be able to batch create redirections. I have a number of URL's I need to redirect, so I put those in an array and made a foreach loop with mysql query. This works. However, the data in the redirector field of the redirection table in the DB is chinese to me. For instance, in:

'O:16:"A_Redirector_URL":1:{s:3:"url";s:26:"http://www.domain.com/post$1";}'

The first 's' seems to have the same value each time I create a 301 RegEx simple type redirection, but the second one doesn't. I created some redirections where the second 's' had the same value each time, and this caused errors in the redirection admin. So my question is, can someone explain to me what this second 's' is, and how I can set it to the right number in a batch query?

Kind regards,

Walter

Read responses...

Responses

  1. John:

    Posted 8 months ago by Key Master

    The plugin is not really designed to be used outside of the classes provided in the plugin. The redirector field uses PHP serialization to store an object. You will it fairly difficult to recreate this directly from MySQL

Reply

You must log in to post.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008