We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38487
    • 15 Posts
    We recently migrated a large site to Revo 2.1.5. The Resourse Aliases came in with hyphens as delimiters, whereas we use underscores.
    We have set the FURL_alias_word_delimiter to underscores so they do now correct themselves on save, but with ~2000 resources, is there a way to get modx to reset aliases based on the new FURL_alias_word_delimiter?

    Thank you,
    Lissie
      • 33968
      • 863 Posts
      Hi Lissie, you can run a find and replace query in phpMyAdmin, something like this should do it (not tested though):
      UPDATE modx_site_content SET alias = REPLACE(alias, "-", "_")
      

      Try it on your test site first though, and backup before touching the live site. You'll need to clear the site cache to see the changes.

      That said, I believe hyphens are still a better choice to use for your urls. Here's a good article explaining why:
      http://themetaq.com/articles/seo-under-scrutiny-are-hyphens-or-underscores-better-word-separators [ed. note: okyanet last edited this post 12 years, 3 months ago.]
        • 38487
        • 15 Posts
        Thank you. I do realize hyphens are preferable, the site has been running a few years with underscores so we may do a mod rewrite regular expressions to replace underscores with hyphens...
        • You can try executing this script in a file at the root of your site...

          https://gist.github.com/917662

          This will set all the uri values to blank (that are not explicitly overridden, aka frozen) and then recalculate them all using your current rules.

          Something like this should be occurring when changing those System Settings, but let me know if this resolves it for you, as we may need to modify the way the URI's are being recalculated.