Upgrading from classic to S - Keeping permalinks alive?

I am currently working on moving our omeka classic to omeka-S and I was wondering what was the best solution to keep our current links alive.
I have upgraded omeka classic to omeka-s and kept a property holding the id from omeka classic and was wondering what was the best way to use them (having http://1886.u-bordeaux-montaigne.fr/items/show/76462 to still work when omeka-S will replace omeka classic on this server).

Using a .htaccess RewriteRule that will use the old id to build and advanced search Url querying the omeka_classic_id property that I have transferred to omeka-s ?

Have you got any other idea?

Best regards,

1 Like

In case someone has the same question, what I have currently done is to add to my .htaccess file the following :

RewriteRule ^items/show/(.*)$ "http://%{HTTP_HOST}/s/1886/item?fulltext_search=&property[0][joiner]=and&property[0][property]=211&property[0][type]=eq&property[0][text]=$1&property[1][joiner]=and&property[1][property]=&property[1][type]=eq&property[1][text]=&resource_class_id=&item_set_id[]=&submit=Recherche" [L]

Where :

  • 1886 is the slug of our default website;
  • 211 is the id of a property I have created that contains the id of the item in my omeka classic install;

On omeka classic, before running the omeka2importer script, I had done the following (from memory, might not be the exact way it was done) :

  • extract all the items id (select id from items;)
  • using regexp, change all lines from (.*) to INSERT INTO element_texts (`record_id`, `record_type`, `element_id`, `text`) values ($1, 'item', 112, '$1';) where 112 is the id of a field called omeka_classic_id and created in omeka classic; Save this file as update.sql
  • run mysql -uUSER -pPASS database < update.sql to insert the fields.
1 Like