Posted By

zachharkey on 04/29/09


Tagged

drupal pathauto urlalias


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

tronx
zack


MySQL queries for bulk editing Drupal url aliases


 / Published in: MySQL
 

In case you don't feel like loading 3 pages to edit a single url alias.

  1. # Change all aliases with paths like foo/* to bar/*
  2. UPDATE url_alias SET dst = REPLACE(dst, 'foo/', 'bar/') WHERE dst LIKE 'foo/%';
  3.  
  4.  
  5. # Delete all aliases with paths like foo/*
  6. DELETE FROM `url_alias` WHERE dst LIKE 'category/%';

Report this snippet  

You need to login to post a comment.