I am currently working with Drupal 6. I just want to know how to convert all the underscores in the URL of my website to hyphens.

  • I'm afraid without a lot more detail, this question is going to be closed as being far to vague or broad in scope.
    – Jimajamma
    Commented Jan 29, 2014 at 6:04
  • Yes, more details would be good. I'm guessing you are talking about the separator in aliases created by pathauto. I wrote an answer. Commented Jan 29, 2014 at 6:52
  • Hello and welcome. We are not a support forum or anything, trying to hurry us is pointless. No one is paying us to answer you. So please ask your question in a form you wouldn't mind to see in a professional knowledge library.
    – Mołot
    Commented Jan 29, 2014 at 8:12

1 Answer 1


At admin/build/path/pathauto change the separator from underscore to hyphen and make sure the other punctuation settings are the way you like (the ones that say "Replace by separator").

Then at admin/build/path/delete_bulk delete all the aliases that you want to change.

Then recreate them at admin/build/path/pathauto by checking "Bulk generate aliases for nodes that are not aliased" in Node paths, User paths etc. as needed.

  • Of course this will break most links in content's body. And it does not cover links created within modules, with hook_menu and hook_menu_alter.
    – Mołot
    Commented Jan 30, 2014 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.